Design > System Services, Listeners and Connectors > Using the Email Service
  

Using the Email Service

Email Connection Properties

You can define an Email connection to send an email from an email server to a specified list of recipients. You can use OAuth 2.0 authentication or password-based authentication for an Email app connection. You can use OAuth 2.0 authentication only for a Microsoft Outlook email account.
In some cases, you might want to define multiple Email connections. For example, you might use different SMTP hosts for each school within a university or have multiple domains that each require a unique SMTP configuration. Each SMTP host requires a separate connection.
When you select IICS Cloud Application Integration Email (Licensed for use) as the connection type, you can configure the email-specific connection properties on the connection creation page.
To create the email connection using password-based authentication, configure the following properties on the connection creation page:
Property
Description
Authentication
Required. Specifies whether the Email connection must use password-based authentication.
If you select Enable, Email Connector authenticates the user name and password that you enter in the email connection properties.
If you select Disable, Email Connector does not perform authentication, and ignores the user name and password that you enter in the email connection properties.
Default is Enable.
User Name
Required if you enable password-based authentication. If you disable password-based authentication, Email Connector does not perform authentication, and ignores any value that you enter in this field.
Enter the user name to log in to the email server. The user name is either the account name or the email address. For example: notifyme@mydomain.com
Note: If you have configured SMTP in your environment to work without password-based authentication, do not enter a user name and password.
Password
Required if you enable password-based authentication. If you disable password-based authentication, Email Connector does not perform authentication, and ignores any value that you enter in this field.
Enter the password for the email address.
Note: If you have configured SMTP in your environment to work without password-based authentication, do not enter a user name and password.
Security
Required. Specify the security protocol that the Email connection must use.
Select one of the following values:
  • - None. The Email connection does not use a security protocol.
  • - TLS. The Email connection uses the TLS protocol.
  • - SSL. The Email connection uses the SSL protocol.
Default is None.
Connection Timeout
Optional. Specify the number of milliseconds to wait when attempting to connect to the email server.
Default is 30000 milliseconds.
If you encounter a timeout while using an Email connection, review your network and firewall configuration.
To create the email connection using OAuth authentication, configure the following properties on the connection creation page:
Property
Description
Authorization URL
Required. Enter the OAuth authorization URL for the email service that is used to authorize the user request.
For example: https://login.microsoftonline.com/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/oauth2/v2.0/authorize
Token Request URL
Required. Enter the OAuth token request URL that handles token requests.
For example: https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/token
The refresh token expires in 90 days. The user must authenticate again and publish the connection before the token expires.
Client ID
Required. Specify the identifier value from the OAuth provider.
Client Secret
Required. Enter the client secret to connect to the email application.
Scope
Required. Specify the scope. The scope in OAuth authentication limits an application's access to a user's account. You can select multiple scopes for a single client. To enter multiple scopes, separate each value with a space.
For a Microsoft Outlook email account, enter the following scope:
https://outlook.office.com/SMTP.Send offline_access
Authorization Status
Indicates the current status, the name of the user who authorized, and the last time when the authorization was completed.
Authorize Access
Click to initiate the authorization workflow using OAuth.
Note: In the OAuth provider, set the redirect URI to the host of the CAI POD in which you create a connection. The redirect URI must contain the /oauthcallback string. For example: https://<Informatica Cloud Application Integration URL>/oauthcallback
Configure the following common properties on the connection creation page:
Property
Description
Host
Required. Enter the email server’s DNS name, such as mail.mydomain.com, or an IP address, such as 192.168.1.1.
Port
Required. Enter the port for communication between the Process Server and the email server.
Default is 25.
Test Email Address
Optional. Enter the email address to which you want to send a test message when you test the Email connection.
Separate multiple email addresses with a comma character.
From Email Address
Optional. Enter the email address that you want to appear in the From field of emails sent from the connection. For example: no-reply@example.com

Publishing Email Connections

After you create an Email connection, you can validate, save, and publish the connection. For more information, see Design.
When you publish an Email connection, Application Integration creates the following items on the Metadata tab:
sendEmailService
sendEmailService is the action that you must select in a Service step of a process or guide to send an email.
The following image shows the sendEmailService action:
The image shows the sendEmailService action.
AttachmentInformation
The AttachmentInformation object defines the attachments to be sent with the email. You can use XQuery attachment functions to construct attachments. For more information about creating and using attachments, see the following link: Attachments.
The following image shows the AttachmentInformation object:
The image shows the AttachmentInformation object with the name, content, and mimeType fields.
EmailTaskInput
The EmailTaskInput object defines the input for the email. The object defines the recipients, email subject, email content type, email body, and attachment information.
The following image shows the EmailTaskInput object:
The image shows the EmailTaskInput object with the to, cc, bcc, subject, contentType, body, and attachment fields.
EmailTaskOutput
The EmailTaskOutput object defines the response of the sendEmailService action. The object defines whether the email was sent successfully, and also lists the following details:
The following image shows the EmailTaskOutput object:
The image shows the EmailTaskOutput object with the validSentAddress, validUnsentAddress, invalidAddress, and status fields.

Using Email Objects in a Process or Guide

To use the email objects in a process or guide, perform the following steps:
    1Create a field to which you want to assign the email object.
    2From the Type list, select More types.
    3From the Category list, select Connection defined Types.
    4From the Connection list, select the email connection.
    5From the Types section, select the required email object as shown in the following image:
    The image shows the email objects that you can use in a process or guide.
    You can then assign values to the email object fields in the process or guide.

Using an Email Connection in a Process or Guide

After you create an Email connection, you can use it in a Service step in a process or guide.
Perform the following steps to use an Email connection in a process or guide:
  1. 1Add a Service step to the process or guide.
  2. 2Click the Service tab.
  3. 3From the Service Type list, select Connection.
  4. 4From the Connection list, browse and select the Email connection that you created.
  5. 5From the Action list, select the sendEmailService action that was created when the Email connection was published. Application Integration populates the emailTaskInput object under input fields and the emailTaskOutput object under output fields.
  6. The following image shows a sample Service step that sends an email:
    The image shows a Service step that sends an email.
  7. 6Click the Input Fields tab.
  8. 7Set the content of the email message in the emailTaskInput field.
  9. To send an email to multiple recipients, separate the email addresses with a comma character.
  10. 8Configure email attachments and output fields as needed.
  11. 9Validate, save, publish, and run the process or guide.