Skip to content

How to Send Merged PDFs via Email

Configure SMTP settings, set up email templates, and run bulk email campaigns. Send personalized PDFs as attachments to hundreds of recipients.

Sending Merged PDFs via Email Campaigns

Mergram’s email campaign feature lets you send personalized PDFs as attachments — directly from the merge workflow. Instead of downloading merged PDFs and emailing them one by one, you can automate the entire process: merge, attach, personalize, and send in a single operation.

Prerequisites

Before setting up an email campaign, make sure you have:

Choosing an SMTP provider

If you don’t have a dedicated SMTP service, Gmail works for small campaigns (up to ~500 emails/day). For larger campaigns, use a transactional email provider like SendGrid, Mailgun, or Amazon SES for better deliverability and higher sending limits.

How It Works

The email campaign workflow combines PDF generation with email delivery:

  1. Merge: Generate personalized PDFs from your template and data
  2. Email: Each PDF is attached to a personalized email
  3. Send: Emails go through your SMTP server
  4. Track: Monitor delivery status in real time

This means every recipient gets a unique PDF with their own data — names, amounts, IDs, QR codes — delivered directly to their inbox.

SMTP Configuration

Connect any standard SMTP server. Here are common provider settings:

ProviderHostPortNotes
Gmailsmtp.gmail.com587Use App Password, not account password
SendGridsmtp.sendgrid.net587Username: apikey (literal), password: your SendGrid API key
Mailgunsmtp.mailgun.org587Use your domain credentials
Amazon SESemail-smtp.*.amazonaws.com587Region-specific hostname
Postmarksmtp.postmarkapp.com587Use Server API token
Office 365smtp.office365.com587Requires licensed mailbox

Gmail App Password

To use Gmail as your SMTP server, you need to create an App Password in your Google Account (Security → 2-Step Verification → App passwords). Your regular Gmail password will not work if 2FA is enabled.

Email Template Personalization

Use the rich text editor to craft your email body with merge fields. Any column header from your spreadsheet can be used as a placeholder:

Merge FieldReplaced With
[[name]]Recipient’s full name
[[email]]Recipient’s email address
[[company]]Company name
[[amount]]Invoice amount
[[dueDate]]Payment due date
Any column headerThe value from that column for each row

Subject line example: Your invoice for [[month]] — [[company]]

Body example:

Hi [[name]],

Please find your invoice for [[month]] attached. The amount due is [[amount]], payable by [[dueDate]].

If you have any questions, don't hesitate to reach out.

Best regards,
The Billing Team

The rich text editor supports bold, italic, lists, and links. You can also insert merge fields anywhere in the body by typing [[ and selecting from the autocomplete list.

Preparing Your Recipient Data

Your spreadsheet must have an email column — this is required for the campaign. Additional columns become available as merge fields:

NameEmailCompanyAmountDue Date
Alice Chenalice@acme.comAcme Corp$1,250.002025-02-15
Bob Martinezbob@globex.comGlobex Inc$3,400.002025-02-15
Carol Johnsoncarol@initech.comInitech$890.002025-03-01

Email column is required

Every row must have a valid email address. Rows with missing or invalid emails will be skipped during sending. Check your data for typos before starting the campaign.

Security

Mergram takes email security seriously:

Tracking Campaign Progress

After launching your campaign, track its progress from the Jobs panel:

StatusMeaning
QueuedEmail is waiting to be sent
SentSMTP server accepted the email
OpenedRecipient opened the email (detected via tracking pixel)
ClickedRecipient clicked a link in the email
FailedDelivery failed (bounced, invalid address, SMTP error)

Failed emails show the error reason so you can identify and fix data issues. Common failure causes include invalid email addresses, full mailboxes, and SMTP rate limiting. Re-send a corrected campaign after fixing the data.

You can export tracking data (delivery status, open timestamps, click timestamps) as a CSV file for reporting and analysis.

When to Use Email Campaigns

Email campaigns are ideal when you need to deliver personalized documents directly to recipients:

Best Practices for Email Deliverability

  1. Use a dedicated SMTP provider — Gmail is fine for testing, but transactional providers (SendGrid, SES, Mailgun) provide better delivery rates
  2. Warm up your sending domain — Start with smaller batches and increase gradually
  3. Verify your domain — Set up SPF, DKIM, and DMARC records for your sending domain
  4. Personalize subject lines — Emails with personalized subjects have higher open rates
  5. Test with a small batch first — Send to 5–10 internal addresses before launching a full campaign
  6. Keep attachments under 10MB — Large PDFs may be blocked by some email providers
  7. Include a plain-text fallback — Mergram generates this automatically from your HTML body

Common Issues and Troubleshooting

SMTP authentication failed: Double-check your host, port, username, and password. For Gmail, ensure you’re using an App Password. For SendGrid, use apikey as the username (the literal string, not your actual API key) and your SendGrid API key as the password.

Emails going to spam: Set up SPF, DKIM, and DMARC records for your sending domain. Most transactional email providers have setup guides for this.

Rate limiting errors: If your SMTP provider enforces rate limits (e.g., Gmail’s 500/day), spread your campaign over multiple days or switch to a higher-limit provider.

Missing attachments: Ensure your PDF template has fields that map correctly to your data. Empty merges produce empty PDFs, which some email clients may strip.

Get Started

Configure your SMTP settings in Mergram, upload a template and spreadsheet, and send your first email campaign in minutes. Start with a small test batch to verify everything works before scaling up.

Step-by-step guide

  1. 1

    Configure SMTP

    Go to Settings → SMTP and enter your server details: host, port, username, password, and encryption settings.

  2. 2

    Create Email Template

    Write your email subject and body using the rich text editor. Insert merge fields for personalization.

  3. 3

    Merge & Attach PDFs

    Run the merge job. Each row generates a personalized PDF that gets attached to the corresponding email.

  4. 4

    Send Campaign

    Review and send. Track delivery status in real-time from the Jobs panel.

Frequently asked questions

Which SMTP providers are supported?
Any standard SMTP server — Gmail, SendGrid, Mailgun, Amazon SES, Postmark, and self-hosted servers. If you can send email through it, Mergram can use it.
Can I personalize the email body?
Yes, use the rich text editor with merge fields like [[name]], [[email]], and any column header from your spreadsheet to personalize each email's subject and body.
Is there a limit on emails per campaign?
You can send up to 100,000 emails in a single campaign, subject to your SMTP provider's rate limits and your Mergram plan credits.
Can I add password-protected PDFs as email attachments?
Yes. Set a password template in the merge dialog before running the email campaign. Each recipient gets their own encrypted PDF that only they can open.
How do I track email delivery status?
Mergram tracks each email's delivery status (queued, sent, failed) in real time. Open and click tracking are also available — see which recipients opened their email and which links they clicked. Check the Jobs panel for a per-recipient breakdown and export tracking data as CSV.

Ready to try it yourself?

Start merging PDFs in minutes — free account required, no credit card needed.

Related articles