Skip to main content

Mandrill

Prerequisites

Prerequisites

Before setting up the Mandrill integration, ensure you have:

Create a Mandrill API Key

Mandrill uses API keys for authentication. Note that Mandrill is part of Mailchimp, so you'll need a Mailchimp account to access Mandrill.

  1. Sign in to your Mailchimp account (or create one if you don't have it)
  2. Navigate to Account & Billing > Extras > Mandrill
  3. If you haven't set up Mandrill yet, click Get Started with Mandrill
  4. Once in Mandrill, navigate to Settings > SMTP & API Info
  5. Under API Keys, you'll see your existing API keys or can create a new one
  6. To create a new API key:
    • Click Add API Key
    • Enter a description for the API key (e.g., dashx-integration)
    • Click Create API Key
  7. Copy the API key immediately - you'll need it for authentication
warning

Make sure to securely store your API key. For security reasons, you won't be able to view the API key again after leaving this page. If you lose it, you'll need to create a new one.

Mandrill and Mailchimp

Mandrill is Mailchimp's transactional email service. You need a Mailchimp account to use Mandrill. If you're new to Mailchimp, you'll need to complete the Mailchimp signup process first before accessing Mandrill.

Verify your domain

Domain verification in Mandrill allows you to send emails from your domain and improves deliverability.

  1. In the Mandrill dashboard, navigate to Settings > Sending Domains
  2. Click Add Sending Domain
  3. Enter your domain name (e.g., yourdomainname.com) and click Add Domain
  4. Mandrill will generate DNS records that need to be added to your domain
  5. You'll see several DNS records:
    • TXT record for domain verification: This verifies domain ownership
    • CNAME records for DKIM: These enable DKIM signing (typically 2-3 records)
  6. Add these records to your domain's DNS settings:
    • Copy the Host and Value from the Mandrill console
    • Add them as the corresponding record type (TXT or CNAME) in your DNS provider
    • The exact process varies depending on your DNS provider (Route 53, Cloudflare, GoDaddy, etc.)
  7. After adding all records, return to the Mandrill console
  8. Click Verify Domain or wait for automatic verification
  9. Verification may take a few minutes to several hours depending on DNS propagation. The status will change from Pending to Verified once Mandrill detects the records
tip

DNS propagation can take up to 48 hours, but typically completes within a few hours. You can check your DNS records using tools like dig or online DNS checkers to verify they're properly configured.

Set up SPF

Sender Policy Framework (SPF) helps prevent email spoofing by specifying which mail servers are authorized to send emails on behalf of your domain.

  1. In your domain's DNS settings, add or modify a TXT record with the following:
    • Name/Host: @ or yourdomainname.com (depending on your DNS provider)
    • Type: TXT
    • Value: v=spf1 include:spf.mandrillapp.com ~all
  2. The include:spf.mandrillapp.com part authorizes Mandrill to send emails on behalf of your domain
  3. The ~all means "soft fail" - emails from unauthorized servers will be marked but not rejected
note

If you already have an SPF record, you should modify it to include include:spf.mandrillapp.com rather than creating a duplicate. Multiple SPF records are not allowed. For example, if you have v=spf1 include:_spf.google.com ~all, change it to v=spf1 include:_spf.google.com include:spf.mandrillapp.com ~all.

Set up DKIM

DomainKeys Identified Mail (DKIM) adds a digital signature to your emails, allowing recipients to verify that emails were sent and authorized by the owner of the domain.

  1. Mandrill automatically includes DKIM configuration in the domain verification process
  2. The DKIM CNAME records will be provided during domain verification (typically 2-3 records)
  3. Add the DKIM CNAME records to your domain's DNS settings:
    • Each record will have a name like mandrill._domainkey.yourdomainname.com
    • The values will be CNAME records pointing to Mandrill's DKIM endpoints
  4. After adding the records, Mandrill will automatically detect them and enable DKIM signing
  5. You can verify DKIM status in the Sending Domains section of your Mandrill dashboard
info

DKIM signing status will show as Verified in the Mandrill dashboard once all CNAME records are properly configured and detected. This typically takes a few minutes to a few hours after adding the DNS records.

Set up DMARC

Domain-based Message Authentication, Reporting, and Conformance (DMARC) builds on SPF and DKIM to provide instructions on how to handle emails that fail SPF or DKIM checks.

  1. In your domain's DNS settings, add a TXT record with the following:
    • Name/Host: _dmarc.yourdomainname.com
    • Type: TXT
    • Value: v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomainname.com
  2. Replace dmarc-reports@yourdomainname.com with an email address where you want to receive DMARC aggregate reports
  3. The p=none policy means "no action" - this is recommended for initial setup to monitor without affecting email delivery
  4. As you gain confidence, you can change the policy to:
    • p=quarantine - Move failing emails to spam/junk folder
    • p=reject - Reject emails that fail DMARC checks
tip

Start with p=none to monitor your email authentication without impacting delivery. Review DMARC reports regularly and gradually tighten the policy as you verify that your legitimate emails are passing SPF and DKIM checks.

Set up BIMI (Optional)

Brand Indicators for Message Identification (BIMI) allows you to display your brand logo in supported email clients, enhancing brand recognition and trust.

  1. Prepare your logo:
    • Create an SVG version of your brand logo
    • The logo must meet BIMI specifications:
      • SVG format
      • Square aspect ratio (1:1)
      • Maximum file size: 32KB
      • Must be publicly accessible via HTTPS
  2. Host the logo:
    • Upload the SVG file to a publicly accessible HTTPS URL (e.g., https://yourdomainname.com/logo.svg)
    • Ensure the server has a valid SSL certificate
  3. Add BIMI record to DNS:
    • In your domain's DNS settings, add a TXT record with the following:
      • Name/Host: default._bimi.yourdomainname.com
      • Type: TXT
      • Value: v=BIMI1; l=https://yourdomainname.com/logo.svg
    • Replace the URL with the actual location of your hosted logo
note

BIMI is currently supported by a limited number of email clients (including Gmail for verified senders). Even if not all clients support it, setting up BIMI doesn't negatively impact email delivery and prepares you for broader adoption.

Configure webhook events (Optional)

Mandrill can send webhook events for email delivery, bounces, opens, clicks, and other events. This is useful for tracking email performance in DashX.

  1. In the Mandrill dashboard, navigate to Settings > Webhooks
  2. Click Add Webhook
  3. Configure the webhook:
    • Post to URL: Enter your DashX webhook URL
      • To get the webhook URL: Log in to your DashX workspace, navigate to the Integrations section, find your Mandrill integration, and copy the webhook URL
    • Description: Enter a description for the webhook (e.g., DashX Integration)
    • Events: Select the events you want to receive:
      • send: Email was sent
      • hard_bounce: Email hard bounced
      • soft_bounce: Email soft bounced
      • open: Email was opened
      • click: Link in email was clicked
      • spam: Recipient marked email as spam
      • unsub: Recipient unsubscribed
      • reject: Email was rejected
  4. Click Create Webhook
info

Webhook events are optional but recommended for tracking email performance and engagement metrics in DashX. Without webhooks, you'll still be able to send emails, but you won't receive delivery status updates.

Next steps

After completing the setup:

  1. Verify your email authentication setup: Use free online tools to verify that your SPF, DKIM, and DMARC records are properly configured:

    These tools will help you verify that all DNS records are correctly configured and that your emails will pass authentication checks.

  2. Test email sending: Test sending emails through the DashX console:

    • Log in to your DashX workspace
    • Navigate to the Broadcasts section
    • Create a new Broadcast
    • Select your verified domain as the sender
    • Send a test email and verify that it's delivered
    • Verify that SPF, DKIM, and DMARC authentication passes
  3. Monitor email metrics: Monitor your email performance through the DashX console:

    • Navigate to the Broadcasts section in your DashX workspace
    • View sending statistics, delivery rates, and engagement metrics
    • Monitor bounce and complaint rates to maintain a good sender reputation
    • Use these metrics to optimize your email campaigns
  4. Review Mandrill statistics: Check your Mandrill dashboard for additional insights:

    • Navigate to Activity to see recent email activity
    • View Stats for detailed sending statistics
    • Monitor Bounces and Rejects to maintain good deliverability
tip

Mandrill offers a free tier with 500 emails per month. For higher volumes, consider upgrading to a paid plan. Make sure to monitor your sending limits to avoid hitting rate limits. Also note that Mandrill requires a Mailchimp account, so you'll need to maintain an active Mailchimp subscription to use Mandrill.