Skip to main content
Version: 4

Mail Source

Mail Source provides the ability to specify a file as a source and is accessible via email. This section describes how to create a Mail Source service.

Perform the following steps to create a mail source:

  1. Click Configure > SOURCES > Mail Source.

  2. Click ****Create Mail Source.


  3. On the Create Mail Source screen, enter a name and description of the Mail Source. 

  4. If you select GRAPH API as the protocol then provide the following details:

    InformationYou can select the Use Config checkbox (if available) to dynamically fetch the values of the fields from a Git repository at runtime using a variable.
    Field Name
    Description
    Authentication Type
     

    Select the authentication type--Basic or OAuth 2.0. 

    WarningIf GRAPH API is selected as the protocol, the Authentication Type field is disabled for selection with OAuth 2.0 as the default authentication method. 
    • When you select Basic as the Authentication Type, provide the mail server credentials in the User Id, Password, and Confirm Password fields respectively.

      You can also use HashiCorp Vault to fetch the secrets (credentials) for User Id and Password. Each secret is maintained as a key-value pair in Hashicorp Vault. Select the checkbox against the respective fields to use Vault to fetch secrets for the fields. Enter the variable in the following format in the field:

      ${Vault:<Key1>}Where, <Key1> is the key in Hashicorp Vault that is defined for the field.

      For example, you need to enter ${Vault:mailSourceUserId} in the User Id field, if you have defined mailSourceUserId as the key for this field in the Vault. For more details, refer to this page.
    • When you select OAuth 2.0 as the Authentication Type, you need to provide an OAuth account in the field that follows.  

      OAuth Account

      Select one of the available OAuth accounts from this field.

      SuccessOAuth Account field displays only those OAuth Accounts for which you have selected Use In Mail Activity check box while creating the account. Click  here to know how to create an OAuth Account.
      Search criteria

      Provide the criteria for the email. The available options are: Sender E-mail, Subject, Mail Content.
      You can: 

      • Select more than one filter criteria.
      • Use asterisk and wild cards in the content of the email. 

      Ensure that multiple email ids are separated by comma (,).

      Data Location
      Select location of the data in the email --either as an Attachment, in the email Body or as Multipart (to send both in the attachment and email body in the mail source).

      If you select Multipart option, perform the following steps:

      • Connect the output stream of the source layout to the mail source. The output of the source layout is sent as an Attachment in the mail source.
      • Create a Put-Context Var activity before the mail source and set the variable and Message Body in Variable Value to send it as an email Body in the mail source.

        For example,

        VariableName: Service.<<MailSourceActivityName>>.MessageBody
      File Name 
      Name of the file, if the data is to be sent in the email as an attachment. Mail Source activity does not support more than one file attachment. 
      Leave Copy On Server
      Select this option to retain a copy of the email on the server.
    • If you select POP3 or IMAP4 as the protocol, provide the details for the fields listed in the table below, followed by those mentioned above. 

      Field Name
      Description
      Incoming Mail Server
      Incoming mail server address
      Domain 
      Enter the domain where the CDO host machine belongs.  
      CDO host machine
      Enter the name of the CDO host machine to interact with Microsoft exchange server and Outlook data. 
      Security Type
      Protocol that provide data encryption and authentication between applications and servers in scenarios where that data is being sent across an insecure network. The available options are SSL, TLS, None. Supported TLS version is 1.2.
      Port
      Port number of the incoming mail server. Based on the selected protocol, the default port number for POP3 and IMAP4 protocol is displayed in this field.
    • Expand Advanced Properties.

    • Define the required character set encoding code in the Character Set Encoding Used text box.
      **
      **

    • Select the project from the drop-down list of Project.

    • Click Save.

      WarningClick Test to verify the mail source service at design time. 
      When a Mail Event triggers Process Flows, each Process Flow uses a mail source. At times, when multiple Process Flows use a mail source, errors can occur. In such case, you can retry the action before exiting the mail source. You can also set the number of retries in the abpm.mailEvent.retry property.