Bounce Handling in Mautic - Choosing Between AWS SES and Standard Email Accounts

5 min read

Bounce management is critical for maintaining email deliverability and ensuring your marketing campaigns reach their intended audience. In Mautic, bounce handling involves detecting undelivered emails (bounces) and unsubscribe requests (complaints), then updating contact records accordingly.

This guide explores two approaches: Amazon Web Services (AWS) Simple Email Service (SES) and standard email accounts (e.g., Gmail, Outlook, or hosted email).

Why Bounce Management Matters

  • Maintain Sender Reputation: High bounce rates harm your domain’s reputation, increasing the risk of emails being flagged as spam.
  • Compliance: Automatically update contact lists to reflect unsubscribes and invalid addresses.
  • Efficiency: Save time by automating manual tasks like list cleaning.

AWS SES vs. Normal Email Accounts: Key Differences

FeatureAWS SES + SNSNormal Email Account
Bounce/Unsubscribe HandlingAutomated via SNS topics (HTTPS endpoints or email notifications).Manual folder monitoring (IMAP) for bounce/complaint emails.
Bounce Email FlexibilityAny valid email address (e.g., [email protected], [email protected]).Must use the same email account used for sending.
InfrastructureAWS-managed; scales automatically.Limited by email provider’s policies and quotas.
DeliverabilityOptimized with AWS reputation tools.Dependent on email provider’s domain reputation.
Setup ComplexityRequires DNS records, SNS topics, and IAM permissions.Simple: Just SMTP/IMAP credentials.
CostPay-as-you-go (low cost per 1,000 emails).Often free (if using existing email accounts).

Why Choose AWS SES?

  • Scalability: AWS SES is ideal for high-volume senders, handling millions of emails daily without performance degradation.
  • Flexibility: Use any email address (even third-party domains) for bounce notifications.
  • Advanced Analytics: Real-time feedback via SNS ensures accurate tracking of bounces, complaints, and delivery status.
  • Cost-Effectiveness: Cheaper than services like Mailchimp or SendGrid at scale.

When to Use a Normal Email Account

  • Simplicity: No need for AWS configuration—just SMTP/IMAP credentials.
  • Low-Volume Needs: Suitable for small businesses or campaigns sending <10,000 emails/month.
  • Budget Constraints: Avoid AWS fees by leveraging existing email infrastructure.

Implementing Bounce Management with AWS SES

Prerequisites

  • AWS account with SES and SNS access.
  • Domain verified in AWS SES (DKIM/SPF records configured).
  • A dedicated email address for bounce handling (e.g., [email protected]).

AWS Step-by-Step Setup

Step 1: Verify Your Domain in AWS SES

  1. Log in to the AWS Console.
  2. Navigate to Amazon SES > Domains under "Identity management."
  3. Click Verify a New Domain, enter your domain, and check Generate DKIM Settings.
  4. Add the provided DNS records (TXT and CNAME) to your domain’s DNS settings.
  5. Wait for verification to complete (up to 72 hours).

Step 2: Create SNS Topics for Bounces and Complaints

  1. Go to Amazon SNS > Topics.
  2. Click Create topic (Standard type).
  3. Name the topic: ses-bounces-YOUR-DOMAIN.
  4. Repeat to create a second topic: ses-complaints-YOUR-DOMAIN.

Step 3: Configure SES Feedback Notifications

  1. Return to Amazon SES > Verified identities > select your domain.
  2. Under Notifications, click Edit.
  3. For Bounces:
    • Set notification method to SNS.
    • Select the ses-bounces-YOUR-DOMAIN topic.
    • Enable Include original email headers.
  4. For Complaints:
    • Set notification method to SNS.
    • Select the ses-complaints-YOUR-DOMAIN topic.
    • Enable Include original email headers.
  5. Click Save changes.

Step 4: Subscribe Your Bounce Email to SNS Topics

  1. In Amazon SNS, select the ses-bounces-YOUR-DOMAIN topic.
  2. Click Subscribe to topic > Protocol: Email > Endpoint: [email protected].
  3. Repeat for the ses-complaints-YOUR-DOMAIN topic.
  4. Confirm subscriptions via verification emails sent to [email protected].

Step 5: Configure Mautic

  1. Navigate to Mautic Admin > Settings > Configuration > Email Settings.
  2. Mail Send Settings (SMTP):
    • SMTP Host: email-smtp.us-west-2.amazonaws.com (region-specific).
    • Port: 465 (SSL).
    • Username/Password: AWS SES SMTP credentials.
  3. Monitored Inbox Settings (IMAP):
    • Monitored Address: [email protected].
    • IMAP Host: mail.thirdpartydomain.com.
    • Port: 993 (SSL).
    • Folders: Create Bounces and Complaints in the inbox.
  4. Test connections and save settings.

Implementing Bounce Management with a Normal Email Account

Prerequisites

  • A valid email account (e.g., Gmail, Outlook, or your hosted email).
  • IMAP/SMTP access enabled for the account.

Step-by-Step Setup

Step 1: Configure Email Settings in Mautic

  1. Navigate to Mautic Admin > Settings > Configuration > Email Settings.
  2. Mail Send Settings (SMTP):
    • SMTP Host: smtp.gmail.com (or your provider’s server).
    • Port: 465 (SSL). GMAIL might require an APP Password.
    • Username/Password: Your email account credentials.
  3. Monitored Inbox Settings (IMAP):
    • Monitored Address: [email protected] (same as sending email).
    • IMAP Host: imap.gmail.com (or provider’s server).
    • Port: 993 (SSL).
    • Folders: Create Bounces and Complaints in the inbox.

Step 2: Test Bounce Handling

  1. Manually move an email to the Bounces folder.
  2. Run the CLI command to process bounces:
    php bin/console mautic:email:fetch -v

    ** use the flag -v for verbose to see any errors
  3. Ensure the contact is marked as "bounced" in Mautic.
  4. If the above works, then create rules which push these emails to the correct folders. Mautic can use these folders for checking.

Common Issues and Troubleshooting

AWS SES-Specific Issues

IssueSolution
Bounces Not RecordedEnsure SNS topics are linked to SES and [email protected] is subscribed.
SNS Subscription FailingManually confirm via verification emails sent to the bounce email.
IMAP Connection ErrorsValidate IMAP settings (host, port, encryption) for the bounce email.

Normal Email-Specific Issues

IssueSolution
IMAP Extension MissingInstall PHP IMAP extension: sudo apt install php-imap.
Folders Not FoundConfirm Bounces and Complaints folders exist in the inbox.
Manual Bounce Testing FailsEnsure emails moved to the Bounces folder match Mautic’s parsing rules (e.g., headers).

Best Practices

  • Monitor Logs Regularly: Use Mautic’s System Info > Log to track any issues related to email fetching.
  • Rotate Credentials: Periodically update SMTP/IMAP passwords and AWS access keys.
  • Use Dedicated Folders: Keep bounce/complaint traffic isolated from regular email.
  • Test with Simulator Emails: Use AWS’s [email protected] for validation.

Final notes

  • AWS SES is optimal for scalability, automation, and flexibility in bounce email configuration.
  • Normal Email Accounts suit low-volume senders prioritizing simplicity.
  • CLI Commands: Automate bounce processing via cron jobs (e.g., every 15 minutes).
  • PHP IMAP Extension: Ensure it’s installed to avoid errors like Call to undefined function imap_search.