Send message Version 3 (Java)
Action group: Mail
Description
The action creates a message and sends it to the specified email.
Action icon
Parameters
Input parameters
Context - email connection context identifier.
From - sender mail address.
To - list of addresses of the recipients of the letter. Use «;» as a separator.
CC - list of addresses of recipients of a copy of the letter. Use «;» as a separator.
Subject - subject of mail.
Message body - message body.
Attachments - the path to the file to be attached. If you need to attach several attachments, paths to files are indicated with «;».
Settings
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Context | Email connection context identifier | Robin.JavaMail | Yes | |
From | Sender mail address | Robin.String | Yes | |
To | List of addresses of the recipients of the letter. Use «;» as a separator | Robin.String | Yes | |
CC | List of addresses of recipients of a copy of the letter. Use «;» as a separator | Robin.String | No | |
Subject | Subject | Robin.String | No | |
Message body | Message body | Robin.String | No | |
Attachments | The path to the file to be attached. If you need to attach several attachments, paths to files are indicated with «;» | Robin.FilePath | No |
Special conditions of use
None.
Example of use
Task
Send a message with "Test message" as subject, "Hello world" as message body to the following address: testsforrobin@mail.ru.
Attach a docx-file to the message.
Solution
Connect the email from which the message will be sent. For any actions with a particular mailbox, you must first connect to it, create its unique identifier (Context).
Define the mail service. (Connection parameters to the mailbox depend on the mail service).
Send the message.
Implementation
- Assemble a robot scheme with the actions:
- Set the "Open email" action parameters. (read the action description at Connection settings).
- Set the "Send message" action parameters.
Setting the action:- "Context" parameter. It is necessary to select from the drop-down list the context corresponding to the mailbox from which the message will be sent.
- "From" parameter. Specify the mailbox from which the message will be sent.
- "To" parameter. Specify the mailbox to which the message will be sent.
- "Subject" parameter. Specify the subject pf the message.
- "Message body" parameter. Specify the variable with employees personal data (Full name, phone number).
- "Attachments" parameter. Specify the path to the file.
- Click "Start" in the top panel.
Result
The message with the necessary document was sent.