Set up inbound email

Applies to User roles: System Administrator

To set up inbound email for Smart Email, you must add and enable an instance of the Smart Email integration in Integration Manager.

To add and enable a Smart Email integration instance, follow these steps:

  1. Log on to Service Manager as a system administrator.
  2. Click Tailoring > Integration Manager. Integration Instance Manager is displayed.
  3. Click Add. The Integration Template Selection wizard opens.
  4. Select SmartEmail from the Integration Template list, and then select the Import Mapping check box.

  5. Click Next. The Integration Instance Information page is displayed.
  6. Complete the following settings in the Integration Instance Information page as necessary.

    Setting Value Description
    Name (required) User-defined. Default: SmartEmail. Name of the integration instance.
    Version (required) 1.0 Version number of the integration.
    Interval Time (s) (required) User-defined. Default: 300. Polling interval (in seconds) for synchronization.
    Max Retry Times (required) User-defined. Default: 5. Maximum allowed number of retries if the background scheduler fails to run.
    SM Server Enter a name that identifies your Service Manager server host. For example, sm_host1. Display name for your Service Manager server host.
    Endpoint Server Enter a name that identifies your mail server host. For example, mail_server1. Display name for your mail server host.
    Log Level Select a level from the drop-down list. Default: INFO. Level of diagnostic information that the Service Manager server logs to the log file directory. The possible log levels are: DEBUG, INFO (default), WARNING, ERROR, and OFF.
    Log File Directory Specify a directory. For example: c:\smartemail_logs.

    This is a directory that exists on the Service Manager server host where log files of the Service Manager and mail server integration are stored. The log includes information for receiving and processing emails.

    If this field is empty, the system uses the Service Manager sever log (sm.log) for Smart Email.

    If you set the log parameter for the Smart Email processor separately, the log file specified here only contains the logs for receiving emails while the log file set for the processor contains the logs for processing emails.

    Run at system startup True or false. Automatically enable or disable the integration instance when the Service Manager server is started.
    Description User-defined. Description of the integration instance.
  7. Click Next. The Integration Instance Parameters page is displayed.
  8. Complete the following settings in the Connectivity tab as necessary.

    Setting Value Description
    Basic Configuration
    Mail Protocol

    Select a protocol from the drop-down list.

    The mail protocol for receiving emails. The supported protocols are IMAP, POP3, and EWS. To use a secure protocol, select IMAPS or POP3S, or use HTTPS for EWS.

    Note If you use a secure protocol, Service Manager only connects to the application or site that Service Manager trusts. That is, you must have a CA-signed certificate within the Java keystore that Service Manager uses. If you use a self-signed certificate, you need to import the certificate into the Java keystore (<SM installation>\Server\RUN\jre\lib\security\cacerts). Otherwise, Service Manager fails to connect to the mail server.

    Note Using IMAP or POP3 together with STARTTLS is not supported.

    Shared Inbox

    True or false.

    Default: false

    This option is only available when you select the "EWS" or "IMAPS" mail protocol. If you enable this option, you can configure a shared mailbox in the Shared Mailbox field as the mailbox for inbound emails.
    IMAP/POP3 Mail Server

    Specify an IP address or domian name.

    For example: mail.example.com.

    The IP address or the fully qualified domain name (FQDN) of the IMAP or POP3 server.

    Note If you selected EWS as mail protocol, the field will be EWS URL. Enter the Exchange Web Service URL. For example: https://outlook.office365.com/EWS/Exchange.asmx

    IMAP/POP3 Port

    Specify a port number.

    For example: 143

    The port number of the email server. The defaults are:

    • IMAP (non-secured): 143
    • IMAP (secured): 993
    • POP3 (non-secured): 110
    • POP3 (secured): 995
    • EWS: port not required
    User Name

    Type an email account.

    For example: abc@exmaple.com

    The email account that is used to connect to the mail server. When a Service Manager user sends an email to this email account, the system processes the email based on the settings in the Smart Email integration instance.

    Tip If you select EWS in the Mail Protocol drop-down list, you can also type a domain account as the user name. For example, example.com\abc.

    Password Type a password.

    The password of the email account that is used to connect to the mail server.

    Shared Mailbox Type an email address.

    This field is only available when you select the Shared Inbox check box for the "EWS" or "IMAPS" mail protocol.

    Configure your shared mailbox in this field as the mailbox for receiving inbound emails. The email account in User Name must be an authorized user to access this shared mailbox.

    Advanced Configuration
    Proxy Host Specify an IP address or domain name.

    If you need to use a proxy server to connect to the mail server from Service Manager server, type the FQDN or IP address of the proxy server in this field.

    Only the SOCKS proxy (Socket 4 and Socket 5)is supported. The HTTP proxy is not supported because JavaMail does not support direct access through an HTTP proxy web server. The SOCKS proxy configured in SMIS takes effect on the inbound email only without any impact on the outbound email.

    Proxy Port Specify a port number. The port number of the proxy server.
    Proxy Username Type an account name. The user name that is used to connect to the proxy server.
    Proxy Password

    Type a password.

    The password that is used to connect to the proxy server
    Authorized Domains

    Specify one or multiple domain name (separated by semicolons).

    For example: example.com.

    The domains that are authorized to send emails to the email account specified for the integration. The Smart Email processor rejects the emails from unauthorized domains and triggers the corresponding Smart Email error handling case.

    You must specify at least one authorized domain. Otherwise no incoming email can be successfully processed by the Smart Email processor.

    Delete Email when successfully processed

    True or false.

    Default: true

    Whether or not to delete the emails from the mail server once they are successfully processed.

    Note If you use the POP3 or POP3S protocol, this option does not take effect due to protocol limitation.

    Processed Email Folder Specify a folder name. For example: Processed.

    The folder in the email account to which the successfully processed emails are moved.

    Note Only root folder in the mailbox is supported. That is, a sibling folder to the Inbox folder. Using a sub folder is not supported.

    Note If you use the POP3 or POP3S protocol, this option does not take effect due to protocol limitation.

    Error Email Folder Specify a folder name. For example: Error.

    The folder in the email account to which the messages with errors are moved.

    Note Only root folder is supported. Using a sub folder is not supported.

    Note If you use the POP3 or POP3S protocol, this option does not take effect due to protocol limitation.

    Tip To verify the connection, after you set up the email integration, send an email to the configured mailbox. If the connection fails, as configured in Smart Email error handling, the administrator will receive a "Failed to connect to the mail server" email notification and the system will create an incident.

    Note You can also configure the smartemailTimeout parameter in sm.ini to define the timeout value that the Smart Email process waits for a connection to the mail server to be established. The default value is 45 seconds. See Parameter: smartemailTimeout.

  9. Click the Options tab, and then configure the following Smart Email options as necessary.

    Setting Value Description
    Basic Options
    New Email Action

    Select an action from the drop-down list.

    The action of Smart Email upon the receipt of a new email message:

    • Create Interaction: Each initial message automatically results in the creation of a new Interaction.
    • Create Incident: Each initial message automatically results in the creation of a new Incident.
    Enable email size restrictions

    True or false.

    Default: false

    Once enabled, you can define the email size (in kb) so that only the emails under the specified size are processed. If the user's email is larger than this value, the system triggers the corresponding Smart Email error case and notifies the sender with an email. For more information, see Smart Email error handling.

    Note If the size specified in this field is bigger than any other attachment size configured in Service Manager, the system ignores the value specified in this field.

    Enable email archiving

    True or false.

    Default: true

    Once enabled, the system stores the inbound emails in a database table (emailarchivingstore).

    Use default operator to create or update records

    True or false.

    Default: false

    If an end user (contact) is not associated with an operator, the system uses the default operator specified here to create or update records.

    Note If you enable this option, when Smart Analytics is used for smart email, similar recommendation or classification might be generated for different end users because the same default operator is used.

    Smart Analytics Options
    Enable Smart Ticketing

    True or false.

    Default: false

    Once enabled, the system automatically classifies the record created from an email by using Smart Analytics. The OCR (image to text) feature of Smart Analytics is also enabled.

    Note This option is only visible if Smart Analytics is enabled.

  10. Click the Error Handling tab, and then configure the error handling settings in each sub-tab as necessary.

    1. In the Configuration sub-tab, specify the configurations for each error case.

      Setting Value Description
      Create Incident

      Select Yes or No.

      Select Yes to create an incident record for this error case. You can configure the field values of the incident in Incident Options.

      Email to Admin

      Select Yes or No.

      Select Yes to send an email to the Admin Email specified in Email Options.

      Email to Sender

      Select Yes or No.

      Select Yes to send an email to the sender of the initial email.

      Email to Others

      Select Yes or No.

      Select Yes to send an email to the operators or email addresses specified in Email Options.
      Error Message SC message ID or plain text.

      The error message in the mail. You can specify an SC message or type plain text.

      Note If you want to use the SC message, define it as scmsg:<scmessage_id>. The scmsg class should be SmartEmail.

    2. In the Incident Options sub-tab, define the default field values in the incident record that the system creates when an error occurs during email processing.
    3. In the Email Options sub-tab, specify the admin email address and other email addresses or operators to receive email notifications configured in the Configuration sub-tab.

      Setting Value Description
      Admin Email

      Email address or operator name

      Specify an email address or operator name for the administrator. When the Email to Admin option is set Yes, the system sends out an email to the email address specified here.

      Other Emails

      Email address or operator name

      Specify one or multiple email addresses or operator names. When the Email to Others option is set to Yes, the system sends out an email to the email addresses specified here.

  11. Click Next. The Integration Instance Fields page is displayed.
  12. Configure the SM fields and the endpoint fields as necessary, and the click Next. The Integration Instance Mapping page is displayed.

  13. Configure the field mapping between the message from the mail server and the SM record (interaction or incident) to be created based on the inbound email.

    Note The out-of-box field mapping in the SMIS template is based on interaction fields. You can use this mapping when you choose to create a new interaction for an inbound email. However, if you selected Create Incident in the New Email Action option, you need to manually re-configure the field mapping for incident fields.

    Note If format control “login.DEFAULT” is not executed properly in your environment, some variables cannot be initialized. You need to reinitialize these variables in SMIS ("Post Script" in field mapping area) based on the current operator.

  14. Click Finish. Service Manager creates the instance.

  15. Enable the integration instance. A processor for the integration instance ("<Smart Email SMIS instance name +instance ID>") that receives inbound emails now runs at the background.

    Tip When the status of the SMIS instance for inbound email goes to "Error", the system administrator needs to navigate to Miscellaneous > System Status, locate the "<Smart Email SMIS instance name +instance ID>" process and kill it. After that, go back to Integration Manager and edit the Smart Email SMIS instance as necessary.

  16. Start the Smart Email processor that processes the received emails:

    1. Add a debug node in sm.cfg. For example:

      sm -httpPort:13081 -httpsPort:13082 -log:../logs/sm.13081.log –debugnode
    2. Restart Service Manager and log on to Service Manager with the debug node:

      Window Client: In the Server port number field, enter the debug node port (for example: 13081).

      Web Tier client: Append serverPort=<debug node port> to the web tier URL. For example: http://myhost:8080/webtier-9.61/index.do?serverPort=13081

    3. Navigate to Miscellaneous > System Status, click Start Schedulers, and then start SmartEmail_Processor<X>.

    Note You can configure the number of SmartEmail processors in Smart Email settings. If the configured number is more than one, you can start different debug nodes to run different processors.

    Note If the server running the debug node has multiple IP addresses, make sure that you set a pubic IP address for the groupbindaddress parameter in sm.ini. Otherwise, the Smart Email solution cannot provide solutions in the emails because the server cannot connect the Smart Analytics Web Service API.

Related topics

Integration Manager
Integration Instance Information fields
Enable or disable an integration instance
Monitor integration instance status