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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextEmail connection context identifierRobin.JavaMail
Yes
FromSender mail addressRobin.String
Yes
ToList of addresses of the recipients of the letter. Use «;» as a separatorRobin.String
Yes
CCList of addresses of recipients of a copy of the letter. Use «;» as a separatorRobin.String
No
SubjectSubjectRobin.String
No
Message bodyMessage bodyRobin.String
No
AttachmentsThe 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

  1. Assemble a robot scheme with the actions:
    image2024-2-2_12-9-0.png

  2. Set the "Open email" action parameters. (read the action description at Connection settings). 
    image2024-2-2_11-53-36.png

  3. Set the "Send message" action parameters. 

    Setting the action:
    1. "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.
    2. "From" parameter. Specify the mailbox from which the message will be sent.
    3. "To" parameter. Specify the mailbox to which the message will be sent.
    4. "Subject" parameter. Specify the subject pf the message.
    5. "Message body" parameter. Specify the variable with employees personal data (Full name, phone number).
    6. "Attachments" parameter. Specify the path to the file.
  4. Click "Start" in the top panel.

Result

The message with the necessary document was sent.

  • Нет меток