Prepare the email for the mail merge
pdfMachine merge allows you to personalize the email using merge fields from the data source:
- email subject.
- to address(es) for the email.
- cc and bcc addresses for the email.
- reply to address for the email.
- smtp from address for the email.
- email body.
@EMAIL tab
Use the @EMAIL tab of the profile to set the email compnents other than the email body. Turn the switches on to configure the CC, BCC, SMTP From and Reply-To components of the email.
Subject
The subject of the body can be text only, or text with merge fields to personalize the subject. If merge fields are used the content from the data source will replace the merge field during the merge.
To address
There can only be one to address. This must be a merge field and will be used as the to address in the email. It will also be used to group the emails for rows to emails methods that use more than one row per email.
CC and BCC
The CC and BCC fields are the addresses used to copy and blind copy recipients to the email. These can hold more than one email address. These must consist of semi-colon separated lists. The lists can include merge fields and plain text. A single merge field can also contain a semi-colon separated list of email addresses.
eg. a single merge field might hold the whole list : could correspond to a cell that holds "email1@mydomain.com;email2@mydomain.com".
eg. a set of merge fields hold the list : ;
eg. the list is a combination of merge fields and text : ;myemail@domain.com.
SMTP From Address
When using SMTP as the email transport method the emails come from the email address specified by the credentials entered in the Email Config. The SMTP From Address allows you to override those to specify a different from address. This field is only used when SMTP is the selected method of email transport.
It is only useful when the selected SMTP server supports it. A number of SMTP servers will ignore this setting. Others require it to be set. You need to work out what works for your specific SMTP server.
Reply-To Address
By default the reply-to address of an email is the address it was sent from. You can specify an alternate reply-to address by entering it in the Reply To address field. This can be text or contain a merge field.
BODY tab
Use the BODY tab of the profile to compose the email body. There is a WYSIWIG editor available that can be used to compose the email.
Source mode
Use the source mode in the HTML Editor to toggle between entering HTML and using the WYSIWIG editor. Note: toggling from source mode back to WYSIWIG may change your HTML. If you are composing the email in HTML source it is wise to leave it in source mode.
Pasting from other programs eg. Microsoft Word
Copying and Pasting from other programs will often paste hidden HTML for formatting. The formatting is often meaningless outside of the program you copied from. The HTML editor has buttons to allow you to "paste", "paste in plain text" and to "paste from Word". For best results utilise these buttons while copying from other programs.
Insert images
When sending HTML emails you need to take into consideration the fact that your recipients may have different email clients than you do. Different email clients render HTML in different ways. The HTML email won't necessarily look the same in the recipient's email program as it looks in your email program. In particular there is no guaranteed method to send an image in a HTML email. Things to take into consideration when using images in the mail can be read about here.
Text direction
Use the Text Direction buttons to switch paragraphs between 'left to right' and 'right to left'.
Upload attachments
By default attachments are sent in the email. However there are circumstances where this is not desirable, eg better security or to overcome email attachment size limits. There are two supported methods, uploading to Broadgun servers and uploading to your Google Drive account. It is described in detail here.