Send Email
This task will send an email using your own SMTP server or a 3rd Party SMTP Server such as Mandrill.
Settings
Attachments
Optional
The file or list of files to be attached to the email. TIP: You can also use the output from a List Files task to set the list of attachments dynamically. Please bear in mind the sending rules of your email provider, you may not be able to send all attachment types. If the attachment type is not recognised by your computer, it may not be displayed correctly in the email, if at all. Should this happen, Zynk will log a debug message detailing the file(s) affected.
Bcc
Optional
The address to send a Bcc (blind carbon copy) of the email to. You can specify a list of email addresses if you would like to send the same email to multiple recipients. A list can be provided either as a comma separated list, or by choosing the 'List' data type and entering each address separately.
Body
Required
The content for the email. If the content is HTML, remember to set the HTML Body setting to True.
Cc
Optional
The address to send a Cc (carbon copy) of the email to. You can specify a list of email addresses if you would like to send the same email to multiple recipients. A list can be provided either as a comma separated list, or by choosing the 'List' data type and entering each address separately.
From
Required
The email address you are sending emails from e.g. [email protected]
Note
If you are using the built-in Zynk SMTP connection, please be aware that the 'From' address will default to '[email protected]'. You can still set the name of the sender by using the 'Name' task setting.
Name
Optional
You can optionally include a name to send the email from, e.g Mr Person [email protected].
HTML Body
Required
Set to True if the body of the email is HTML.
Subject
Required
The subject text for the email.
To
Required
The address you are sending the email to. You can specify a list of email addresses if you would like to send the same email to multiple recipients. A list can be provided either as a comma separated list, or by choosing the 'List' data type and entering each address separately.
Tip
If this task is a sub-task of a repeater, you can use the context variables from the repeater task (e.g. @Context.Current["Email_Address"]
) to dynamically set the address for each email.
SMTP Connection
Required
The SMTP Connection to send the emails from. See the Connecting to an SMTP Server article here if you require more information on how to create/manage connections.
Zynk Settings
Examples
Sample input file for the email body, which contains a static message. Note that this is HTML, so the HTML Body setting will need to be set to True.
<html>
<head>
<Style>
* { font-family:verdana; }
body { font-size: 75%; }
h1 {font-size: 175%; font-weight:normal; font-family: Trebuchet MS}
</Style>
</head>
<body>
<p>Hi,</p>
<p>Thanks for placing an order on our website, it is now being processed.</p>
<p>Regards,<br/>The Zynk Team</p>
</body>
</html>
Sample input file for the email body, which dynamically creates a personalised message by accessing the Forename
and Email_Address
current variables from a repeater task using razor. Note that this is HTML, so the HTML Body setting will need to be set to True.
<html>
<head>
<Style>
* { font-family:verdana; }
body { font-size: 75%; }
h1 {font-size: 175%; font-weight:normal; font-family: Trebuchet MS}
</Style>
</head>
<body>
<p>Hi @(Context.Current["Forename"]),</p>
<p>We've created an account for you on our website, please log in using the username below and set your password.</p>
<p>Username: @(Context.Current["Email_Address"])</p>
<p>Regards,<br/>The Zynk Team</p>
</body>
</html>