Mail Send

Description

The Mail Send Action Component is to send email via SMTP.

The Mail Send component sends an input payload (cv.Payload) as the body of a mail. It converts the data received by the input payload into a string and sends it as the body of an email.

After sending the mail, the input payload is stored as it is as the output payload (pass through).

Properties

NameRequiredDescription
ToTrueTo whom the mail will be sent
CcFalseAny carbon copies
BccFalseAny blind carbon copies
SubjectTrueThe subject of the mail
FromTrueThe from-address
AttachmentsFalseFile(s) to be attached, details below
SMTP ServerFalseSMTP Server you are going to use
HostTrueThe smtp host
PortTruePort
UsernameFalseUsername of your smtp server
PasswordFalsePassword of your smtp server

Use the base Base Property Profile property to read the values from the settings rather than specifying the details within the component.

Component Variables

NameDescription
cv.PayloadThis variable will be used as the mail body. You can set it in the Pre Mappings, if no Payload is being passed into this step. (See screenshot) If you are using a HTML mail body, avoid linebreaks and escape double quotes with a backslash.

Using SMTPs

You can use any available SMTP server to send out e-mails, however, note that depending on what server you are using, they may have different restrictions in order to avoid spamming. To send mails via Apple iCloud or Google Gmail SMTP, we recommend creating app-specific passwords.

Attachments

Multiple files can be specified as attachments.

Path of the file to be attached

Windows environment

The files are automatically stored in the path actmgr\data. The path can also be specified. If a folder name or file name contains spaces, it must be enclosed in "" (double quotes).

Example:

To attach image.jpg from actmgr\data, specify image.jpg as the attachment file.
To attach image.jpg of actmgr\data\subfolder, specify subfolder\image.jpg as the attachment.
To attach image.jpg of actmgr\data\subfolder 2021, specify "subfolder 2021\image.jpg" as the attachment.

Absolute paths can also be specified.

Example:

To attach image.jpg in c:\, specify c:\image.jpg as the attachment.

Files can also be specified as multiple files and wildcards. Use ";" (semicolon) for multiple file separators and "*" (asterisk) for wildcards.

Example:

To attach image.jpg and image2.jpg from actmgr\data, specify image.jpg;image2.jpg as attachments.
To attach *.jpg in actmgr\data\subfolder, specify subfolder\*.jpg as the attachment.
To attach image.jpg and image2.jpg from actmgr\data and *.jpg from actmgr\data\subfolder, specify image.jpg;image2.jpg;subfolder\*.jpg as attachments.

Mac, Linux, RaspberryPI and Gravio Hub environments

Files are automatically stored in the path actmgr/data. The path can also be specified. If a folder name or file name contains spaces, it must be enclosed in "" (double quotes).

Example:

To attach image.jpg from actmgr/data, specify image.jpg as the attachment.
To attach image.jpg of actmgr/data/subfolder, specify subfolder/image.jpg as attachment.
To attach image.jpg of actmgr/data/subfolder 2021, specify "subfolder 2021/image.jpg" as attachment.

Absolute paths can also be specified.

Example:

To attach image.jpg of /home/username, specify /home/username/image.jpg as the attachment.

Files can also be specified as multiple files and wildcards. Use ";" (semicolon) for multiple file separators and "*" (asterisk) for wildcards.

Example:

To attach image.jpg and image2.jpg from actmgr/data, specify image.jpg;image2.jpg as attachments.
To attach *.jpg in actmgr/data/subfolder, specify subfolder/*.jpg as attachment.
To attach image.jpg and image2.jpg from actmgr/data and *.jpg from actmgr/data/subfolder, specify image.jpg;image2.jpg;subfolder/*.jpg as attachments.