SEND.MAIL

  • Updated

 

The command will send an e-mail for each record in the FROM Data Source or a single e-mail if the Data Source FROM is not specified. The command is introduced from Perfion2022 R1.

Properties

From

Optional. Input Data Source.

If the input is a neutral Table-format the columns can be used to map fields to the e-mails.

If the input is a binary stream, the input will be attached to the e.mail.

To

Optional. Name of the Output Data Source.

The output will contain the result of the send e-mails. Besides the columns from the Input Data Source, the output will contain columns: To, Subject, Body, Cc, Bcc, Attachment, ReplyTo, SendSucceed, ErrorMessage, IgnoreError.

Parameters

@SMTP

The SMTP connection. See the below SMTP section for more info and the syntax.

Lookup from a named Connection defined in Perfion Go to Administration -> Remote Queries and open a query to see available Remote Connection names:
@REMOTECONNECTIONNAME=Gmail

@IgnoreError Ignore errors when sending e-mail. If the sending failed the "SendSucceed" in the output will be False
@To The recipients of this e-mail message. Multiple recipients can be added, separated with Comma or Semicolon
@Subject The subject line
@Body The message body.
@Cc The carbon copy (CC) recipients of the e-mail message. Multiple recipients can be added, separated with Comma or Semicolon
@Bcc The blind carbon copy (BCC) recipients of the e-mail message. Multiple recipients can be added, separated with Comma or Semicolon
@Attachment Binary GUID's added as attachments to the e-mail. Multiple binary GUID's can be added, separated with semicolon. In the e-mail sent, the filename stored in Perfion is used.
@ReplyTo The Reply to e-mail address

Map

From Name of Header, as it is named from Input-source.
To e-Mail parameters: To, Subject, Body, Cc, Bcc, Attachment and ReplyTo can be mapped from the Input source instead of using the @parameters. It is not possible to specify the same parameter eg. "To" both as a Mapping and a parameter.
Script Any Script code to execute for this header

SMTP

Syntax:

host=<server name or ip>;port=<portnumber>;username=<username on server>;
password=<password in plaintext>;usessl=<true/false>;fromaddress=<from address>
;fromname=<from name>
Setting Description Default value
Host The Name of the Header as it should be called in the Output-source. Mandatory/Not specified
Port The Port number on the SMTP host 587
FromAddress The displayed "From address" Mandatory/Not specified
FromName The displayed "From name" Not specified
Username Username to the login credentials Not specified
Password Password in plane text to the login credentials Not specified
UseSSL Use Secure Sockets Layer (SSL) to encrypt the connection Default is false
UseHTML Use HTML in the mail message body Default is false

Example 1

Example of SEND.MAIL command setup in Actions to send mail for each image in tblProducts.

Notice that the body and attachment do not use the @parameters, so they are mapped from the input source and the feature value will show in the body and the Lifestyle image is used as an attachment.

Example 2

Example of SEND.MAIL command setup in Actions to send mail with attachment BinaryStream.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.