Transactional email providers like Mailgun and SendGrid are specialized messaging services designed to handle sending event-triggered automated emails from websites or applications to you or your customers.
These vendors offer improved email delivery with simple DNS changes and authentication.
Table of Contents
-
Introduction to Transactional Emails
- Definition and Purpose
- Importance of Transactional Emails
-
Setting Up Transactional Emails
- Initial Steps and Requirements
- Choosing a Transactional Email Provider
- Configuring DNS Settings (SPF, DKIM, DMARC)
-
Integrating Transactional Emails with Your Website
- Using APIs for Integration
- Setting Up SMTP Authentication
- Configuring Email Plugins (e.g., Post SMTP)
-
Best Practices for Transactional Emails
- Ensuring Deliverability
- Personalization and Content Guidelines
- Monitoring and Analytics
-
Common Issues and Troubleshooting
- Email Delivery Problems
- Authentication Failures
- Debugging Email Sending Issues
-
Advanced Features and Customizations
- Using Webhooks for Real-time Notifications
- Email Templates and Custom Designs
- Automating Email Workflows
-
Security Considerations
- Protecting Against Spoofing and Phishing
- Secure Transmission (TLS/SSL)
- Regular Audits and Compliance
-
FAQs and Additional Resources
- Frequently Asked Questions
- Helpful Links and Documentation
- Support and Contact Information
Examples of Transactional Email
Nearly every notification sent by WordPress, WooCommerce, or contact form plugins like Gravity Forms would be considered a transactional email.
- New user notifications
- Password resets
- Security issues, lockouts, plugin vulnerabilities
- Notifications of new orders, updated order status, and canceled orders
- Contact form messages or sales leads
Transactional emails are typically one-way and are not intended for back-and-forth communication, especially not through the WordPress interface.
Why Would We Need a Transactional Email Service?
There are many reasons to use a transactional email provider to send messages from your website or applications.
Advantages of Transactional Email Providers
- Reliability and Deliverability: Transactional email providers have robust infrastructure and established reputations with email providers like Gmail, Outlook, and Yahoo. This ensures that your emails are delivered reliably and are less likely to be marked as spam.
- Email Authentication: Providers like Mailgun, SendGrid, and Amazon SES handle the complexities of email authentication (DKIM, SPF, and DMARC) for you. This helps verify your emails as legitimate and trusted, improving deliverability.
- Scalability: Whether you're sending a few emails per day or thousands, transactional email providers can effortlessly handle large volumes. They ensure that your emails are sent promptly, even during high-traffic periods.
- Detailed Analytics and Reporting: These services offer advanced analytics and reporting tools, allowing you to track delivery rates, open rates, bounce rates, and more. This data helps you monitor and optimize your email communications.
- Security and Compliance: Transactional email providers implement strong security measures to protect your data and comply with regulations like GDPR and CAN-SPAM. This ensures that your email communications are secure and legally compliant.
- Reduced Server Load: Offloading the email-sending task to a dedicated service reduces the load on your web server, improving your website's performance and responsiveness.
Disadvantages of Transactional Emails
While using a transactional email provider like Mailgun offers many advantages, there are a few potential drawbacks to consider:
- Shared IP Address: If you're on a pay-as-you-go plan and don't have a dedicated IP address, your emails are sent from shared IP addresses. This means other users on the same IP can affect your email deliverability, especially if they engage in poor email practices. Mailgun manages and monitors these IP addresses, but shared resources can still pose risks.
- Cost: While pay-as-you-go pricing can be cost-effective for low volumes, costs can add up quickly if your email volume increases unexpectedly. It's important to monitor your usage to avoid surprise expenses. For larger volumes, exploring volume-based pricing plans might be more economical.
- Setup Complexity: Initial setup can be complex, particularly for those unfamiliar with DNS management or API integration. Correctly configuring DKIM, SPF, and DMARC records is crucial for email deliverability but can be technically challenging.
- Rate Limiting: Pay-as-you-go users might face rate limiting, which can restrict the number of emails sent per hour or day. This could be a constraint if your email volume grows or you have peak times when many emails need to be sent simultaneously.
- Support Limitations: Lower-tier plans often come with limited customer support compared to premium plans. If you encounter issues or need technical assistance, you might experience slower response times or have access to fewer support resources.
- Dependency on External Service: Relying on an external provider means you depend on their uptime and performance. While providers like Mailgun are generally reliable, any service interruptions on their end can impact your email-sending capabilities.
Note: The Post SMTP plugin logs all messages even if they fail to deliver, providing you with a backup in case of errors.
Overall, while Mailgun provides robust and reliable email delivery solutions, weighing these potential drawbacks against the benefits is essential to determine if it's the right fit for your needs.
How Do Transactional Emails Work?
Transactional emails work through a streamlined process designed to send automated, event-triggered messages efficiently and reliably.
Here's how it typically works:
- Trigger Event: A specific action on your website or application triggers an email. Common triggers include a user signing up, making a purchase, requesting a password reset, or submitting a contact form.
- Email Generation: Once triggered, the email content is generated. This includes the subject, body, recipient information, and any necessary attachments. The content can be personalized based on user data, ensuring the email is relevant to the recipient.
- API or SMTP Request: The generated email is sent to the transactional email provider using an API (ApplicationProgramming Interface) or SMTP (Simple Mail Transfer Protocol). An API request involves sending the email data through a secure web connection, while SMTP works similarly to traditional email sending but with enhanced authentication.
- Email Authentication: The transactional email provider handles email authentication using protocols like SPF, DKIM, and DMARC. These protocols verify that the email is legitimate and comes from a trusted source, helping to prevent it from being marked as spam.
- Delivery to Recipient: The transactional email provider routes the email through its network and sends it to the recipient's email server. The provider's infrastructure ensures high deliverability rates, meaning the email is more likely to reach the recipient's inbox rather than being filtered out.
- Tracking and Reporting: Once sent, the transactional email provider tracks the email's delivery status, open rates, click-through rates, bounces, and other metrics. This data is made available to you through the provider's dashboard, allowing you to monitor the performance of your emails.
Using a transactional email provider ensures that your automated emails are delivered quickly, securely, and reliably, with comprehensive tracking to help you understand and improve your email communications.
Contact support to see if transactional emails are included in your plan.
How Do I Setup Transactional Email?
Setting up transactional email (we'll use Mailgun for this example) involves several steps to ensure proper configuration and integration with your website.
37SOLUTIONS offers the use of our Mailgun account on select hosting plans. Contact support to configure it for you.
Here's a straightforward guide to get you started if you want to create your own account:
-
Create a Mailgun Account:
- Visit Mailgun's website and sign up for an account. Follow the prompts to verify your email address and complete the registration process.
-
Add and Verify Your Domain:
- In the Mailgun dashboard, navigate to the "Sending" section and select "Domains."
- Click on "Add New Domain" and enter your domain name. Mailgun will provide DNS records (TXT, MX, and CNAME) that you must add to your domain's DNS settings.
- Log in to your domain registrar (e.g., GoDaddy, Namecheap) and add the provided DNS records.
- Return to the Mailgun dashboard and click "Verify" once the DNS records have propagated (this might take a few minutes to a few hours).
-
Configure DNS for Email Authentication:
- Ensure that SPF and DKIM records provided by Mailgun are correctly added to your DNS settings. This will help authenticate your emails, improve deliverability, and reduce the chances of your emails being marked as spam.
-
Generate API Keys:
- In the Mailgun dashboard, go to the "API Keys" section.
- Note down the API key (specifically the Private API Key), as you'll need it to integrate Mailgun with your website or application.
-
Install and Configure a WordPress Plugin (if applicable):
- If you're using WordPress, install a plugin like Post SMTP.
- Go to the plugin settings in your WordPress dashboard and select Mailgun as your mailer.
- Enter the Mailgun domain name and API key obtained from the Mailgun dashboard.
- Configure any additional settings as required and save the changes.
-
Test Email Sending:
- Send a test email from your website to ensure everything is configured correctly.
- Check the Mailgun dashboard to see the status of the test email and ensure it was delivered successfully.
-
Monitor and Optimize:
- Use Mailgun's dashboard to monitor email delivery, open rates, click rates, and any errors.
- Adjust settings as necessary to improve email performance and ensure reliable delivery.
By following these steps, you can effectively set up transactional email with Mailgun, ensuring your website can send automated, reliable emails to your users.
Can I Send Messages Without a Transactional Email Provider?
Absolutely! You don't need a Mailgun or SendGrid account to send compliant messages from your website, but it will require some setup and coordination within your company.
DNS Changes
First, you need to make some DNS changes at your DNS provider (e.g., Cloudflare, GoDaddy, Namecheap):
- DKIM: Adds a digital signature to your emails, proving they haven't been altered and are truly from your domain.
- SPF: Specifies which mail servers are allowed to send emails on behalf of your domain, preventing spoofing.
- DMARC: Provides instructions to receiving mail servers on handling emails that fail DKIM or SPF checks, further securing your email communications.
SMTP Authentication
The next step is crucial, but many clients encounter difficulties.
Your website must authenticate (sign in) to your email server (e.g., 37SOLUTIONS Hosted Email, Google Workspace, Microsoft 365). Without authentication, your messages might be blocked, quarantined, or lost.
Create A Sending Mailbox
We recommend creating a new email address, such as wordpress@yourdomain.com, with a complex, non-expiring password for sending emails.
Avoid using info@, contact@, admin@ as these addresses are considered spammy.
Do not use noreply@, no-reply@, or any variation of "do not reply," as that's considered a bad practice from the recipient's perspective. Customers should always be able to reply to a message to get support. If your wordpress@ mailbox is unmonitored, use your WordPress plugin's "reply-to" feature to redirect replies to your support team (i.e., Reply-To: support@yourdomain.com).
Here are some other ideas for your mailbox address:
- wordpress@
- notification@
- leads@
- team@
Note that the email address must be on the same domain—you can't use a free Gmail or Yahoo mailbox to send messages from your website.
Use Hybrid Email Hosting To Reduce Costs
If the additional cost of an extra mailbox is a concern, you can use any existing email address from the same domain (e.g.,sales@, john.doe@). Ensure your mailbox has a complex password that does not change frequently. Frequent password changes require updates on your website, or emails will fail unless there's a backup method available.
For clients looking for cost-effective solutions, we offer hybrid email hosting. With this service, you can combine powerful Microsoft Exchange accounts—for power users or C-Suite executives—with cheaper IMAP accounts. An IMAP mailbox costs only $2.50/month, compared to $11+ for Exchange or MS 365, making it a budget-friendly option for users who don't need the full power of Exchange.
A hybrid email hosting solution allows you to manage your costs effectively while ensuring reliable email sending from your website.
Contact support for details: https://support.37solutions.com/hc/en-us/requests/new
Configure Post SMTP Plugin
Once you have a mailbox to send messages, we typically install the Post SMTP WordPress plugin (formerly Postman), which includes all the features needed to configure your email settings properly.
Learn More About Email Delivery
The core technology behind email, specifically the Simple Mail Transfer Protocol (SMTP), has remained largely unchanged since its inception. The fundamental way emails are transmitted and received has stayed the same over the years.
Additional Security Measures
However, over the last decade, there have been significant advancements in email security to combat spam, phishing, and other malicious activities.
Email providers have implemented stricter authentication protocols such as SPF (Sender Policy Framework), DKIM(DomainKeys Identified Mail), and DMARC (Domain-based Message Authentication, Reporting, and Conformance).
These measures help verify that emails are from legitimate sources and have not been tampered with.
Impact on Website Owners and System Administrators
As a result of these enhanced security measures, website owners and system administrators must now implement and manage these protocols. This adds to their workload, as they must ensure proper DNS configurations, handle email authentication, and monitor email deliverability to prevent their emails from being marked as spam.
Overall, while the user experience of sending and receiving emails may not feel drastically different, the work behind the scenes to ensure secure and reliable email delivery has increased significantly.
How Do Websites Send Email?
Websites, including those built on WordPress, send emails using a combination of software and protocols designed to deliver messages reliably.
When a WordPress site needs to send an email—such as a contact form submission, password reset, or order confirmation—it relies on an email-sending service or a plugin. This process involves generating the email content and using an SMTP(Simple Mail Transfer Protocol) server to handle the actual delivery.
However, most plugins send "unauthenticated" messages, which popular email providers may no longer support.
Why Are Unauthenticated SMTP Messages Bad?
When a plugin isn't configured to authenticate (sign in) to an email server, several issues can arise:
- Emails May Not Be Sent: The emails may fail entirely without proper authentication. The server might reject the connection attempt due to the lack of credentials.
- Emails May Be Marked as Spam: Even if the emails are sent, they are more likely to be marked as spam or junk by recipient email servers. Authentication helps prove that the email is legitimate and from a trusted source.
- Poor Deliverability: The chances of emails reaching the intended inboxes are significantly reduced. Unauthenticated emails often have poor deliverability rates.
- Increased Risk of Email Spoofing: Without authentication, malicious actors can easily spoof your email address, leading to potential security risks and damage to your domain's reputation.
- Lack of DKIM and SPF: Authentication typically involves setting up DKIM and SPF records, which help verify the email's origin. These are necessary for emails to be trusted by receiving servers.
- Error Messages: Users may see error messages or logs indicating that the email failed to send, which can be confusing and frustrating.
Properly configuring authentication for your email plugin is crucial to ensure reliable and secure email delivery from your WordPress site.
Frequently Asked Questions
But I Already Have DKIM and SPF!
Even with DKIM and SPF configured, you still need to authenticate to your external email server with your email address, username, and password.
Here's why:
- Verification: DKIM and SPF help verify that your emails are legitimate and coming from a trusted source. Still, they don't establish a direct connection to your email server. SMTP authentication with your credentials ensures that the server recognizes and authorizes you to send emails.
- Secure Access: Your email server requires authentication to prevent unauthorized access and misuse. You prove your identity by providing your username and password, allowing the server to accept and relay your emails.
- SMTP Server Requirements: Most SMTP servers, including those from external providers like Microsoft 365 or Google Business Email, require authentication to ensure secure communication. This prevents spam and abuse by confirming that only authorized users can send emails.
- Consistent Deliverability: Authentication helps maintain high deliverability rates. Even with DKIM and SPF, emails might be rejected or flagged as suspicious if the server doesn't recognize the sender as an authenticated user.
Combining DKIM, SPF, and authentication through your plugin ensures your emails are secure, verified, and reliably delivered to recipients' inboxes.
But It Worked Before! When Did The Rules Change?
We frequently get the "but it worked before!" statement from clients. A better question is, "when did the rules change?"
Popular email providers like Google, Microsoft, and Yahoo have progressively increased their security measures to combat spam and unauthorized email use. They began phasing out support for unauthenticated messages and enforcing stricter authentication requirements roughly around the mid-2010s.
These providers moved towards mandatory email authentication to improve email security, reduce spam, and protect users from phishing attacks. Consequently, using authenticated email practices (such as configuring SPF, DKIM, and authenticating SMTP) became essential for reliable email delivery.
Further reading: https://powerdmarc.com/google-and-yahoo-email-authentication-requirements/
Are Newsletters The Same Thing?
Transactional emails and newsletters serve distinct purposes in email communication.
Transactional Email
Transactional emails are automated messages triggered by specific user actions or events, such as purchase confirmations, password resets, and account notifications. They are essential for facilitating and confirming transactions and providing critical information to users promptly and reliably. They are typically sent individually and are highly personalized, ensuring they reach the recipient's inbox with high deliverability rates.
Bulk Email
In contrast, newsletters are bulk emails sent to a list of subscribers to share updates, promotions, and other marketing content. These emails are designed to engage and inform a broad audience, often featuring visually appealing designs and rich content. Newsletter services like MailChimp, ActiveCampaign, AWeber, MailerLite, GetResponse, and Constant Contact offer tools for creating and managing these campaigns, including advanced analytics, segmentation, and automation features. Unlike transactional emails, newsletters are scheduled and sent regularly, aiming to maintain ongoing communication and foster relationships with the audience.
Conclusion
Using a transactional email provider like Mailgun simplifies the process of sending reliable, authenticated emails from your website. This approach improves email deliverability, ensures important alerts and leads reach your clients and provides valuable insights into email performance. By leveraging Mailgun's services, you can focus on your core business activities, knowing your email communications are in good hands.
Comments
0 comments
Please sign in to leave a comment.