How to mail merge and send one email with multiple attachments that have the same layout but different information

Use the "Each row creates an attachment" method of pdfMachine merge to achieve this.

Step 1. Create the template (layout).

Using Word, PowerPoint, HTML or Excel create a template with the layout, formatting, text, and graphics that is common to all of the documents to be attached to an email.

Insert 'merge fields' as placeholders in the template where the personalized information for each document will be inserted.

2. Create a data source where "Multiple personalized PDFs are sent in each email". See how.

Create or download an Excel or CSV file that has the data that will change for each document.

Each column is a merge field. Each row holds the information for a single attachment. Consecutive rows with the same email address will become a single email with an attachment for each row.

3. Create a profile in the pdfMachine merge software to link the template and the data source

Select "Each row creates an attachment" so that an attachment is added to the email for every consecutive row in the data source which has that email address.

4. Define the body of the email

Create a body with the layout, formatting and text that will be common to all emails. Insert merge fields as placeholders for the information that will be personal to each email.

5. Choose which email method (Outlook or SMTP) will be used to send the attachments

6. Test the result

7. Send the documents

Watch the Video

Video : How to mail merge multiple PDF attachments which have the same layout

An email is sent with a certificate attached for each course completed.

Video tutorial demonstrating how to use pdfMachine merge. A mail merge sends batches of emails with personalized PDF attachments. Each email has multiple attachments which are built from rows in the data source. Emails can be sent using Outlook or SMTP.

Example : Each row creates a PDF attachment

This example is "Test Profile - Each row creates an attachment".

pdfMachine merge uses a PowerPoint template and a CSV data source. pdfMachine merge will iterate through the rows of the data source generating a personalized PDF attachment for each row, the merge fields are replaced with the appropriate data from each row. On reaching a change in email address, pdfMachine merge will send an email with the generated PDFs as attachments. Both the email and the attached PDFs are personalized with information from the corresponding rows.

Steps to create a merge profile

Template

Create the layout for your dynamically generated PDF attachment.

Step 1 : Create the template

Data Source

Create the data to personalise the emails and PDFs.


Step 2 : Create the data source

Merge Profile

Configure pdfMachine merge to create and send the emails, use "Each row creates an attachment".

Step 3 : Create the profile

Example : Each row creates a PDF attachment

pdfMachine merge installs with ready made profiles to get you started.
This example is "Test Profile - Each row creates an attachment"

Create a template (this one was created in PowerPoint) that has merge fields surrounded by {{ }}. The names of the merge fields must exactly correspond to the column names in the data source. The merge fields can be formatted using the Liquid Templating Language.

Example : Each row creates a PDF attachment

pdfMachine merge installs with ready made profiles to get you started.
This example is "Test Profile - Each row creates an attachment"

Create a data source (this one is a CSV file) that has merge fields as column headings. Each row must have an email address. Create consecutive rows with the same email address to have that data bundled as attachments to one email.

In this example four emails will be sent.

  • The first will have 4 attachments
  • The second will have 2 attachments
  • The third will have 1 attachment
  • The fourth will have four attachments

Example : Each row creates a PDF attachment

pdfMachine merge installs with ready made profiles to get you started.
This example is "Test Profile - Each row creates an attachment"

Create a profile within pdfMachine merge. Merge fields can be used - surrounded by {{ }}. Attach your data source and template. Set the Rows To emails method to "Each row creates an atachment".

. . .