Adobe Enterprise Technical Enablement
Sending an Email Message from a
Process
In this topic, you will learn how the Email service can be used to send email messages from
a process.
Objectives
After completing this unit, you should be able to • Send an Email message from a process
Concepts
Using the Email service in a process
• The Email service enables processes to
■ Receive email messages from a POP3 or IMAP server ■ Send email messages to an SMTP server
• The Email service offers the following operations
■ Send With Document - Sends an email message that has a single attachment ■ Send With Map of Attachments - Sends an email message that has multiple
attachments
■ Receive - Receives email messages and attachments from either a POP3 or IMAP email server
Note: Only the Send with Document operation will be covered in this topic.
Send With Document operation
• The Send With Document operation sends an email message with a single attachment • Located in Foundation > Email - 1.0
Send With Document operation properties
• To and From Addresses categories
■ Specify who to send the email to (To, CC and BCC)
■ Specify who the email is sent from (From and Reply to email addresses) • Contents
■ Subject
■ Message format (Text or HTML) ■ Message
■ Character set encoding • Attachments
■ Attachment name - File name to use for the attachment
■ Attachment - A document value that represents the file to attach to the email message • Connection
■ Use Global Settings - Specifies whether to use the settings in the Email service configuration instead of the settings specified in the properties of the operation
– “True” means to use the default connection settings configured for the Email service and “False” means to use the settings configured in the properties for the operation
■ SMTP Host - Represents the URL or IP address of the email server ■ SMTP Port Number - The port number that the email server uses
■ SMTP Authenticate - “True” indicates that authentication with the email server is required, “False” indicates that no authentication is required
■ SMTP User - A string that represents the username of the account that should be used to send the message
■ SMTP Password - The password associated with the user account ■ SMTP Transport Security - Represents the transport security used when
communicating with the email server
– SSL - the secure sockets layer protocol is used to send the email – TLS - transport layer security is used
Task 1: Sending an email with an attachment
In this task, you will perform the following • Open a process
• Configure a Send With Document operation • Test the process
Setup
1. Import the Sending_Email.lca file.
2. Add sampleorganization.com to the hosts file.
3. Go to C:\james-2.3.1\bin and run start.bat. This will start the James Mail server. 4. Close James.
5. Go to C:\james-2.3.1\apps\james\SAR-INF and open config.xml with Notepad.
6. Locate the servernames node and replace “localhost” with sampleorganization.com. 7. Save and close the file.
8. Enable telnet on your machine. 9. Restart James Mail.
10. Open a command prompt and type telnet localhost 4555. 11. Login with id = root and password = root.
12. Type adduser srose password.
13. Confirm the console displays "User srose added". 14. Type quit and close the command window. 15. Open Mozilla Thunderbird.
16. On the Mail Account Setup dialog, enter the following. • Your name: Sarah Rose
• Email address: [email protected] • Password: password
17. Click Continue.
18. Confirm that the SMTP and POP servers are set to sampleorganization.com. 19. Test to make sure Sarah can send and receive email to her address.
Steps
Open a process
4. Double-click the SendEmailWithAttachment process to open it.
Configure a Send With Document operation
5. From the process diagram palette, drag the Activity Picker activity onto your process diagram and drop it to the right of the Read PDF Document operation.
6. In the Define Activity dialog box, expand the Foundation category.
7. From the Email service, select the Send With Document operation and click OK. 8. Enter the Name to be Send Email with Attachment.
9. In the To Addresses category, change the To property to literal value and click the ellipsis button to add the value [email protected].
10. In the From Addresses category, change the From property to literal value and the value
11. In the Contents category, set the properties as follows.
• Subject - Email sent from SendEmailWithAttachment process • Message Format - TEXT
• Message - Sending an email with an attachment from a process 12. In the Attachments category, set the properties as follows.
• Attachment Name (literal value) - Mortgage Loan Application.pdf • Attachment (variable) - inPDFDoc
13. In the Connection Settings category, set the properties as follows. • Use Global Settings - unchecked
• SMTP Host (literal value) - sampleorganization.com • SMTP Port Number (literal value) - 25
• SMTP Authenticate - checked
• SMTP User (literal value) - Administrator • SMTP Password (literal value) - password 14. Connect the two operations with a route.
15. Confirm that the process looks like the figure below.
16. Save the process and deploy the application.
Test the process
20. Launch the Thunderbird Email client and open Sarah Rose’s inbox. 21. Click the Get Mail button.
22. Confirm that the email message is received.