Skip to content
Documentation

Email Campaigns

Send personalized PDFs as email attachments directly from Mergram. Configure your SMTP server, compose templates, and track delivery status — all in one place.

Setting up SMTP

Prerequisites

Before sending emails, you need:

  • A working SMTP server (Gmail, Outlook, SendGrid, Mailgun, Amazon SES, or any SMTP provider)
  • Your SMTP credentials (host, port, username, password)
  • A sender email address verified with your SMTP provider

Configuration Steps

  1. Navigate to SMTP settings

    Go to Settings → SMTP in the sidebar.

  2. Enter your SMTP credentials

    Fill in your mail server details:

    • Host — Your SMTP server address (e.g., smtp.gmail.com, smtp.sendgrid.net)
    • Port — Usually 465 for SSL or 587 for TLS
    • Username — Your email address or SMTP login
    • Password — Your email password or app-specific password
    • From name — The display name recipients see
    • From email — The sender email address

    Common SMTP providers

    Gmail: smtp.gmail.com, port 587, use an App Password. Outlook: smtp.office365.com, port 587. SendGrid: smtp.sendgrid.net, port 587, username “apikey”, password is your API key. Amazon SES: email-smtp.region.amazonaws.com, port 465 or 587.

  3. Save and verify

    Click Save & Verify to store your credentials and test the connection in one step. Mergram will attempt to connect to your SMTP server and report any errors. If verification fails, your credentials are saved but marked as unverified — fix the settings and re-verify before sending emails.

Security

Your SMTP password is encrypted with AES-256-GCM before storage. It is never stored in plain text. You can update or delete your SMTP credentials at any time from Settings → SMTP.


Creating an Email Campaign

  1. Set up your merge template

    Upload your PDF template and spreadsheet as usual. Place data fields on the canvas and preview to ensure everything looks correct.

  2. Configure email settings

    In the merge dialog, switch to the Email tab:

    • To — Select the column containing recipient email addresses
    • Subject — Enter an email subject (use [[ColumnName]] for dynamic values)
    • Body — Write the email body (supports HTML formatting with the rich text editor)
    • Attachments — Each merged PDF is automatically attached

    Email body formatting

    The rich text editor supports bold, italic, bullet lists, numbered lists, and links. You can also switch to raw HTML mode for advanced formatting. Use [[ColumnName]] placeholders anywhere in the subject or body to personalize content.

  3. Send

    Click Send Emails to start the campaign. Emails are processed in the background, and you can track progress in real time.


Tracking & Status

  • Batch status — View the overall progress of your email campaign
  • Per-recipient tracking — See the delivery status for each individual email (sent, failed, bounced)
  • Error details — If an email fails, the error message is displayed for troubleshooting
  • Credit usage — Each email sent costs 1 credit from your team’s balance
  • Open tracking — See how many recipients opened their email (via a 1×1 tracking pixel)
  • Click tracking — See which links in your email body were clicked
  • CSV export — Download tracking data as a spreadsheet for reporting
  • Privacy-conscious — IP addresses are hashed; no JavaScript in emails

Rate limits

For large campaigns (hundreds or thousands of emails), check your SMTP provider’s rate limits. Most providers enforce hourly or daily sending limits. Exceeding these limits causes delivery failures.


Email Tracking

Mergram provides built-in open and click tracking for every email campaign. No third-party analytics services are required — tracking works with any SMTP provider.

How Open Tracking Works

When you send an email campaign, Mergram appends an invisible 1×1 tracking pixel (a .png image) to the end of the email body. When a recipient’s email client loads remote images, the pixel is fetched from Mergram’s server and the open event is recorded.

Each open event captures:

  • Timestamp — When the email was opened
  • Open count — Multiple opens from the same recipient are counted

Not all opens are detected

Some email clients block remote images by default (e.g., Outlook, Apple Mail in certain configurations). Recipients using these clients may open your email without triggering the tracking pixel. Open counts should be treated as a lower bound, not an exact measurement.

How Click Tracking Works

Any links in your email body are automatically rewritten through a Mergram redirect URL. When a recipient clicks a link, they pass through Mergram’s server (which records the click event) and are then immediately redirected to the original destination URL.

Click tracking captures:

  • Timestamp — When the link was clicked
  • Click count — Multiple clicks from the same recipient are counted

CSV Export

You can export all tracking data as a CSV spreadsheet for reporting and analysis. The CSV includes per-recipient columns for delivery status, open timestamps, open counts, click timestamps, and click counts.

Data Retention

Tracking data follows the same fileRetentionDays policy as other team data. When the retention period expires, tracking records are automatically purged along with the associated job data.

Privacy

Mergram’s tracking is designed to be privacy-conscious:

  • IP addresses are hashed — Recipient IP addresses are not stored in plain text
  • No JavaScript — Tracking relies on a simple image pixel and URL redirects, not embedded scripts
  • No third-party services — All tracking data is processed and stored on your Mergram instance

Tips & Best Practices

  • Send a test email first — Always test with your own email address before launching a campaign
  • Verify email addresses — Clean your spreadsheet to remove invalid or duplicate email addresses
  • Use SPF, DKIM, and DMARC — Configure these DNS records for your sending domain to improve deliverability and avoid spam filters
  • Keep attachments small — Large PDFs may be rejected by recipient mail servers. Aim for under 5 MB per attachment
  • Personalize subject lines — Emails with personalized subject lines have higher open rates. Use [[Name]] in your subject template

Limitations

  • Tracking accuracy depends on recipient email client settings — Clients that block remote images will not register opens; privacy-focused clients may not load the tracking pixel
  • No bounce handling — Bounced emails are reported but not automatically retried
  • No scheduling — Campaigns start immediately when you click Send
  • SMTP-dependent — Deliverability depends on your SMTP provider’s reputation and configuration