Email Addresses =============== The main channel of communication with the customers is often email. An organization consists of multiple departments or teams. Email addresses differ for each group which is servicing your customers. You may have the following: | ``support@example.org`` | ``hr@exapmle.org`` | ``sales@example.org`` These addresses are just some examples, and you may have many more. Use these channels to receive and send messages, and in mail clients, one can often send with the wrong address. Rexpondo manages as many email addresses for your teams as needed. All your email addresses, whether for sending or receiving, are kept and configured nicely in one place. In the :ref:`queue settings`, the correct address is always chosen preventing that someone working in multiple roles sends an email out with the wrong account. To enable Rexpondo to send emails, you need a valid email address to be used by the system. Rexpondo is capable of working with multiple email addresses, since many support installations need to use more than one. A queue can be linked to many email addresses, and vice versa. The address used for outgoing messages from a queue can be set when the queue is created. Use this screen to add system email addresses to the system. An email address is already added to the system at installation time of Rexpondo. The email address management screen is available in the *Email Addresses* module of the *Communication & Notifications* group. .. figure:: images/email-address-management.png :alt: Email Address Management Screen Email Address Management Screen Manage Email Addresses ---------------------- To add an email address: 1. Click on the *Add System Address* button in the left sidebar. 2. Fill in the required fields. 3. Click on the *Save* button. .. figure:: images/email-address-add.png :alt: Email Address Add Screen Email Address Add Screen .. warning:: Email addresses can not be deleted from the system. They can only be deactivated by setting the *Validity* option to *invalid* or *invalid-temporarily*. .. note:: Once an email address is added and set to valid, Rexpondo cannot send an email to this address. This prevents loopbacks which could crash your system. If you need to transfer information between departments please use the ticket split option in the article menu. This will allow you to create a new ticket to another team for assigning a task, for example. .. figure:: images/article-menu.png :alt: Article Menu Article Menu To edit an email address: 1. Click on an email address in the list of email addresses. 2. Modify the fields. 3. Click on the *Save* or *Save and finish* button. .. figure:: images/email-address-edit.png :alt: Email Address Edit Screen Email Address Edit Screen .. note:: If several email addresses are added to the system, use the filter box to find a particular email address by just typing the name to filter. Email Address Settings ---------------------- The following settings are available when adding or editing this resource. The fields marked with an asterisk are mandatory. Email address \* The email address to be added. Display name \* The name of this resource. Any type of characters can be entered to this field including uppercase letters and spaces. The name will be displayed in the sender information of the article. Queue \* The queue, to which the email address will be added as default email address. .. note:: This setting will apply if the email is distributed via the recipient address. This setting can be overridden by :doc:`postmaster-filters` or in the :ref:`Mail Account Settings` when *Dispatching by selected Queue* is chosen. Validity \* Set the validity of this resource. Each resource can be used in Rexpondo only, if this field is set to *valid*. Setting this field to *invalid* or *invalid-temporarily* will disable the use of the resource. .. note:: An email address can only be set to *invalid* or *invalid-temporarily*, if it is not assigned to any queue. Comment Add additional information to this resource. It is recommended to always fill this field as a description of the resource with a full sentence for better clarity, because the comment will be also displayed in the overview table. Configure Email Sending via OAuth2 ---------------------------------- The configuration for email sending must be performed in two distinct sections. First, it is necessary to create and save an access token that will later be used in the SMTP server configuration. Registering the Access Token ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. note:: Before proceeding with the registration, you need to set a new allowed callback URI. In your tenant's configuration used by our Rexpondo system, head over to the section related to the authorized redirect URIs and add the following URI: ``[PROTOCOL]://[HOST]/rexpondo/index.pl?Action=AdminOAuth2Token`` The access token can be registered in the *Admin* section by selecting the option **OAuth2 Token Management**. You must add an account that has the necessary permissions to use the SMTP server. To register the access token, it is required to log in through the IdP configured here :ref:`POP3 and IMAP OAuth2 Authentication`. Ensure that the user account being used has the appropriate permissions to send emails through the SMTP server. Particular attention should be given to the **Name** field, as it acts as the identifying key for the token to be used in the next step. Configuring the SMTP Server ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The SMTP server configuration is carried out in the *Admin* section under **System Configuration**. From the left menu, select the second-level option: **Core -> Email**. The following parameters need to be configured: **SendmailModule** Select **Kernel::System::Email::SMTPTLSOAuth2** from the list. **SendmailModule::Host** Enter the host name (address) of the SMTP server, e.g., `smtp.gmail.com`. **SendmailModule::Port** Enter the port used by the SMTP service. This may vary depending on the provider; for Google Gmail, it is `587`. **SendmailModule::AuthUser** Enter the email address used in the previous step during token registration. **SendmailModule::SSLVerifyMode** Enable this configuration key and set the value to `1` (a boolean indicating the parameter is active). **SendmailModule::SSLCAPath** Enable this configuration key and enter the path to the directory where the CA certificates are stored. On standard Linux systems, this is typically `/etc/ssl/certs`. **SendmailModule::OAuth2::TokenName** Enter the name specified during the registration of the access token created in the previous step. As this is a search key, take special care to ensure that the value matches exactly, including case sensitivity, and avoid any invisible spaces before or after the entered value.