Using Mail Merge When Sending Emails

With the mail merge feature in Xeams, you can create a batch of personalized emails to send to multiple recipients. Each email can include both standard and custom content.

A Sample Use-Case

Consider a scenario where you need to send reminder notifications to your customers who missed their last payment. There are about 500 customers, each with a different name, email, the amount they owe and their last payment date.

Your end-goal is to:

  • Save a list of email addresses, along with the recipient's name, amount and last payment date from a text file.
  • Create a single email message containing the common text for every message along with place holders for the variables (name, amount and last payment date).
  • Have the system automatically replace the place holders with the actual value.
  • Eventually, send 500 emails individually to each customer.
Click here to watch a video

Step-by-Step Instructions

Step 1 - preparing data
Using Microsoft Excel prepare a spreadsheet containing data for every recipient. This sheet must have 4 columns. See a sample image below.

A screenshot demonstrating the preparation of data in MS Excel

Export the contents of this sheet to a .CSV (comma separated values) file. The final file should look like:

A screenshot showing sample CSV file containing records for mail merge
Step 2 - configuring Xeams
Using the following steps, create a new Mail Merge Campaign in Xeams.

  • Connect to Xeams' Admin Console using the admin credentials
  • Click Plugins under Home
  • Click Manage for MailMerge Campaign
  • Fill out the fields to create a new campaign.

    Every mail merge campaign is associated with a Template Recipient Address, which is a fake address that is used to identify this campaign. When composing the template email, you MUST send that email to this fake email address. Xeams will expand emails sent to this address at runtime, replacing the place holders with actual value. We will use sample-mail-merge@yourdomain.com as an example for this field.
Step 3 - configuring Xeams
Compose an email containing place holders and send it to sample-mail-merge@yourdomain.com, which you specified in step 2

The message MUST contain place holders for every variable. The following rules apply for these variables:

  1. The name of the variable MUST match with the column name of the exported CSV file.
  2. Variables must be prefixed by {# and suffixed by #}. For example: {#AmountDue#}
  3. A single variable can be repeated multiple times within the message
The image below contains a sample email.

Composing email in MS Outlook