Magento 2 SMTP Configuration: Ensure Reliable Email Delivery

Table of Content

Magento 2 SMTP Configuration
Last Updated: May 28, 2025

Email remains one of the most effective marketing and sales channels. Abandoned cart reminders, post-purchase follow-ups, and newsletters – personalized email communication helps bring customers back to your online store when the right message lands in their inbox.

Historically, Magento email sending settings used the PHP mail() function for email delivery. This method lacked authentication, didn’t support modern encryption standards, and emails often landed in spam folders — or weren't delivered at all, especially in restrictive hosting environments. 

Starting from Magento 2.4.6, this has changed. Magento now supports native SMTP configuration, allowing you to send emails through secure, authenticated SMTP servers. This enhancement significantly improves deliverability by supporting authentication methods, TLS/SSL encryption, and custom email transport settings.

Below, let's talk about how to get the most out of Magento SMTP, review Magento 2 email settings necessary for effective emailing, and discuss whether additional SMTP modules are still necessary..

What Is SMTP?

SMTP (Simple Mail Transfer Protocol) is the standard protocol for sending emails reliably and securely. It works by transferring messages from your store to your mail server, which then routes them to recipients.

SMTP enables:

  • Authentication – Verifies the sender's identity.

  • Encryption – Protects message content in transit (SSL/TLS).

  • Deliverability Control – Ensures email routing follows compliance and best practices.

Why You Should Configure Magento SMTP Settings

Even with Magento 2.4.6+ offering native SMTP support, properly configuring email delivery remains indispensable. Here’s why:

  • Default PHP mail can still cause issues in misconfigured servers or shared hosting environments.

  • Email deliverability may suffer without proper SMTP setup, leading to missed transactional emails.

  • ISPs often restrict the mail() function, affecting bulk email sending and increasing bounce rates.

In Magento 2, configuring email servers to use SMTP brings the following perks:

  • Reliable delivery using trusted mail servers (e.g., Gmail, SendGrid, Amazon SES).

  • Improved sender reputation through SPF, DKIM, and DMARC alignment.

  • Greater visibility with delivery logs, bounce handling, and performance insights (especially via third-party extensions like Amasty SMTP). 

Third-Party SMTP Extension vs. Default Magento 2 SMTP Settings

Native SMTP support of Magento 2.4.6+ is a welcome addition for store owners who want a simplified setup without installing extra modules. The native settings let you define the SMTP host, port, authentication method, encryption (TLS/SSL), and credentials.

However, the built-in SMTP configuration covers only the basics. It lacks advanced features that many growing or enterprise-level stores may need to ensure deliverability, control, and flexibility. Here are the key differences:

FeatureMagento 2 Native SMTP (2.4.6+)Amasty SMTP Extension
Basic email sending via SMTP✅ Yes✅ Yes
Multiple store support❌ No native support✅ Yes
Email log & debug history❌ Not available✅ Full email log & debugging
Pre-configured SMTP providers❌ Manual setup only✅ One-click integration with Gmail, Amazon SES, etc.
Auto-retry on failure❌ No✅ Yes
Custom "From" address per store/view❌ No✅ Yes
Scheduled email sending / queue management❌ Limited✅ Enhanced queue management
Easy UI for testing and validation❌ CLI-only✅ Built-in testing tools

When to Use Magento’s Default SMTP

If your Magento 2 store runs on Magento 2.4.6 or later and has basic email needs (e.g., transactional emails, contact forms), the built-in SMTP settings may be enough. It's a great choice for developers looking for a lean setup without added overhead.

When to Choose a Third-Party SMTP Extension

If you need full visibility into email logs, better deliverability tracking, easier configuration, or support for multiple SMTP profiles, then a solution like Amasty’s SMTP Email Settings extension is highly recommended. It adds features critical for debugging, compliance, and fine-tuning complex email flows in multi-store environments.

How to Choose an SMTP Provider for Magento 2?

When configuring SMTP in Magento 2, choosing the right provider is your first important step. Here are the key factors to evaluate:

Free vs. Paid SMTP Providers 

Free SMTP options like Gmail SMTP or Outlook SMTP are accessible if you already use business accounts from Google or Microsoft. However, these providers limit usage, typically to around 3,000-5,000 emails per month. They are not designed for bulk or automated e-commerce emailing.

FeatureFree SMTP (Gmail, Outlook)Paid SMTP (SendGrid, Mailgun, etc.)
Cost$0From $10/month
Email Limits~3,000/monthScalable to millions
Automation SupportBasicAdvanced
Reputation ControlLimitedYes
Magento IntegrationManualOften has extensions/API

Integration With Magento 2

Check for:

  • Official Magento 2 SMTP extensions or API support

  • Compatibility with Magento cron and email queue

  • Tutorials or documentation specific to Magento

Popular email services like SendGrid, Mailgun, and SMTP2GO often come with ready-to-use Magento 2 plugins or can be integrated via modules like Amasty SMTP Email Settings.

Monthly Email Volume

Estimate your monthly email volume by calculating:

  • Total subscribers

  • Average emails per user (marketing, transactional, order updates)

  • Triggered emails (cart abandonment, review requests, etc.)

Then match the result to your provider’s tier.

ProviderFree TierMid TierHigh Volume
SendGrid100/day50,000/mo ($19.95)100K+
Mailgun5,000/mo50,000/mo ($35)100K+
Amazon SESNo freePay-as-you-goExtremely scalable

Tip: Don’t risk deliverability by exceeding free limits - Magento 2 requires reliable capacity for transactional emails.

Spam Protection and Deliverability

A reliable SMTP server for Magento 2 should include:

  • SPF, DKIM, DMARC support

  • IP reputation monitoring

  • Spam filtering (e.g., through SpamAssassin or proprietary tech)

  • Feedback loops with ISPs

These measures can block up to 97% of spam and improve trust scores. For example, if 6,790 of your 7,000 contacts are detected as bots or spam addresses, your sender reputation drops instantly. 

Support: Shared vs. Dedicated

Dedicated support offers:

  • Faster issue resolution

  • Direct access to technical teams

  • SLAs for critical issues (like email downtime during a sale)

Choose a provider that offers priority or dedicated support if email is mission-critical to your store.

Magento 2: Configuring SMTP Server

Let’s walk through how to properly configure SMTP in Magento 2 to ensure your emails are reliably authenticated, encrypted, and delivered.

Option 1: Use Built-In Magento SMTP Settings (Magento 2.4.6 and Later)

In the latest (2.4.6+) versions of Magento 2, configuring email sending is possible out of the box. This means that you can configure SMTP directly from the admin panel without any extensions. Here's how:

Step 1: Go to the Admin Panel

Navigate to:  Stores → Configuration → Advanced → System → Mail Sending Settings

Step 2: Enable SMTP Settings

  • Set Host to your SMTP provider’s address (e.g., smtp.gmail.com)

  • Set Port (usually 587 for TLS or 465 for SSL)

  • Choose Set Return Path if required

  • Set Disable Email Communications to No

Step 3: Configure Email Transport

  • Scroll down to Developer → Email Sending Settings

  • Choose SMTP as the transport method

  • Provide authentication credentials (username and password)

  • Choose the encryption type (SSL or TLS)

  • Save the configuration and clear cache

Step 4: Test the Settings Configuration

Magento doesn't offer built-in test email functionality, so you may need to trigger a real transactional email (like a new account registration) or use CLI commands.

Note: The built-in SMTP lacks logging and provider presets, so for advanced use cases, an extension may still be needed.

Option 2: Use a Magento 2 SMTP Extension

If you’re running an earlier version of Magento or want advanced features like email logging, testing tools, and pre-configured mail services, using a third-party extension is the best choice.

Step 1: Choose and Install an SMTP Extension

Here are the top SMTP modules trusted by the store owners:

ExtensionHighlightsFree/Paid
Amasty SMTP Email SettingsTrusted by enterprise stores. Pre-built provider presets, detailed debug logs, and test emails.Paid
Mageplaza SMTPEasy integration with over 30 providers. Includes email logs, resend options.Freemium

Read More: Amasty SMTP vs. Mageplaza SMTP: Extension Comparison

Paid extensions like Amasty offer better support, multi-store handling, and log visibility.

Step 2: Configure SMTP Connection in Magento Admin

If you choose Amasty’s extension, the next steps are:

1. Go to Stores → Configuration → SMTP Email Settings and set Enable SMTP for Email to Yes

magento 2 smtp configuration

2. Switch to SMTP Configuration:

magento 2 smtp settings

Configure the next Magento 2 mail-sending settings:

  • SMTP Provider – Choose your SMTP provider or write Other

  • Server Address – Enter your hostname or IP address

  • Port – Usually it’s 587 for TLS encryption or 465 for SSL.

  • Authentication Method – Login/Password or Authentication Not Required

  • Connection Security – SSL (or None, TLS)

  • Send Test E-mail To – Indicate an email address to which you want to send the test email

Click Save and Check Connection to try out the new Magento email configuration in action.

3. Switch to Automatic Log Clearing, and set expiration periods for logs. 

magento configure smtp

Now on to log-related Magento 2 email settings:

  • Clear Sent Emails Log After – Indicate a number of days.

  • Clear Debug Log After – Indicate a number of days.

Click the Save Config button.

To see these logs, go to Reports → Sent Emails Log or Reports → Debug Log

magento 2 email settings

debug log magento 2 SMTP

Read More: Magento 2 SMTP Setup Extension: Complete Guide

Additional Configurations for Default and Extension-Based SMTP in Magento 2

Whether you're using Magento’s built-in SMTP settings (available in version 2.4.6 and later) or a third-party extension, the following configurations are essential to ensure your emails reach customers reliably and securely.

Authenticate Your Domain (SPF, DKIM, and DMARC)

Email authentication is non-negotiable. Without it, your messages may still land in spam or be blocked outright.

1. SPF (Sender Policy Framework)
Defines which servers can send mail on behalf of your domain. Add a TXT record like: 

v=spf1 include:_spf.google.com ~all

2. DKIM (DomainKeys Identified Mail)
Digitally signs your emails. Your provider will generate DKIM keys. Add them as TXT records.

3. DMARC (Domain-based Message Authentication, Reporting, and Conformance)
Sets policy for what to do when SPF/DKIM checks fail. Sample record:

v=DMARC1; p=quarantine; rua=mailto:[email protected]

You can use tools like MXToolbox, Google Postmaster Tools, or Mail-tester.com to validate these records.

Set Store Email Accounts Correctly

1. Go to: Stores > Configuration > General > Store Email Addresses

2. Define proper names and email addresses for:

  • General Contact
  • Sales Representative
  • Customer Support

3. Use your authenticated domain.

Example:

[email protected]

[email protected]

Configure Cron Jobs (So Emails Get Sent)

Magento uses cron jobs to queue and send transactional emails. If cron isn’t working, your emails won’t be sent, even with correct SMTP settings.

Setup via CLI:

php bin/magento cron:install
php bin/magento cron:run

Then verify:

php bin/magento cron:status

Some SMTP extensions also offer direct send bypassing cron. Use this for immediate test emails, but rely on cron for actual store emails.

Advanced Tips on How to Avoid Landing in Spam

In Magento, configuring SMTP isn’t a silver bullet against spam filter triggers. Your emails might still land in spam if you don’t follow these practices:

  • Use a branded email domain (e.g., [email protected]) to avoid mismatched sender warnings and build customer trust.
  • Set up SPF, DKIM, and DMARC records to authenticate your domain and prevent spoofing.
  • Send through a trusted SMTP or transactional email provider (like SendGrid, Mailgun, or Amazon SES) rather than relying on Magento’s default mail function.
  • Use consistent sender names and email addresses to avoid confusing spam filters and subscribers.
  • Avoid spam trigger words such as “free,” “guaranteed,” or “winner” in subject lines and body text.
  • Minify and clean your email HTML templates to reduce code bloat and prevent rendering issues that spam filters flag.
  • Maintain a clean email list by removing invalid, bounced, or unengaged addresses to protect your sender reputation.
  • Include both HTML and plain-text versions of emails to ensure compatibility and reduce your spam score.
  • Avoid link shorteners (e.g., bit.ly), which are often flagged as suspicious.
  • Ensure clear unsubscribe links and contact details to stay compliant and improve trust signals.

Don’t Leave Magento Email Deliverability to Chance!

If customers don’t receive your emails, they may never return. Missed order confirmations, password resets, and support replies all damage brand trust. Magento 2’s out-of-the-box email handling simply isn’t reliable enough.

Implementing Magento SMTP – with domain authentication, a reliable provider, and proper cron and DNS setup – is the only way to ensure bulletproof Magento 2 email delivery. For maximum ROI, consider pairing your Magento SMTP setup with email marketing and abandonment recovery tools.

Magento 2: Setup SMTP FAQ

The top SMTP extensions for Magento 2 include Amasty SMTP, Mageplaza SMTP, and MagePal SMTP. They offer easy configuration, detailed logs, and support for popular email providers. Choose the one that best fits your budget, tech stack, and email volume

Gmail supports both ports: use 465 for SSL and 587 for TLS. Port 587 is recommended for most cases due to better security and compatibility. Make sure SMTP authentication is enabled and the correct credentials are used when setting it up in Magento 2.

To send email in Magento 2, configure SMTP settings using a reliable extension like Amasty SMTP. Set the sender email, enable cron jobs, and ensure email queues are processed. You can send transactional emails, order updates, and newsletters this way.

Magento 2 does not have a built-in SMTP server. By default, it uses the PHP mail() function, which is unreliable and often blocked. To ensure proper email delivery, you need to integrate a third-party SMTP service via a dedicated Magento SMTP extension.

To set up email in Magento 2, install an SMTP extension like Amasty SMTP for Magento 2, enter SMTP credentials (host, port, authentication), and authenticate your domain with SPF, DKIM, and DMARC records. Test the configuration to confirm emails are sent and received properly.

Originally published: August 14, 2020
August 21, 2020
August 7, 2020
Comments
sparity
May 12, 2021
Nice blog...! Thanks for sharing the post.
Reply
Vladimir Derachits
May 15, 2021
Hi there. Thanks for your feedback, we are glad to share our experience.
Leave your comment

Your email address will not be published

This blog was created with Amasty Blog Pro

This blog was created with Amasty Blog Pro

Loading