Updated 2026-11-20
How to Send Magento 2 Email Through SMTP
Since 2.4.6, Magento can send mail over SMTP without an extension: go to Stores > Settings > Configuration > Advanced > System > Mail Sending Settings, set Transport to SMTP, Host smtp.bulko.io, Port 587, Auth LOGIN, SSL TLS, and enter your Bulko username and password. Then set the Store Email Addresses to addresses on your own domain and resend an order email to test.
A Magento store sends a lot of mail it cannot afford to lose: new order confirmations, invoices, shipment and credit memo notices, account confirmations, customer and admin password resets, contact form messages. Out of the box all of it goes through Sendmail, i.e. the local MTA of the web server or container. On many hosts that MTA is missing (so emails silently vanish), and where it exists it sends from a server IP with no DKIM for your domain, which is why "Magento order emails go to spam" is a perennial forum thread.
From Magento Open Source and Adobe Commerce 2.4.6 the core has a native SMTP transport under Mail Sending Settings, so for current versions you no longer need a third-party SMTP module. Below: the native settings, the 2.4.8 TLS bug, the password in env.php, and the cron that sends order emails in async mode.
Magento SMTP settings
| Field | Value |
|---|---|
| Disable Email Communications | No |
| Transport | SMTP |
| Host | smtp.bulko.io |
| Port (25) | 587 (or 2525 if 587 is blocked; 465 for implicit SSL) |
| Username | Your Bulko username, for example smtp_xxxxxxxxxxxxxxxx |
| Password | Your Bulko SMTP password from the SMTP Access page |
| Auth | LOGIN (PLAIN also works; never NONE) |
| SSL | TLS for 587/2525, SSL for 465 (on 2.4.8 and 2.4.8-p1 see the version notes below) |
| Set Return-Path | No |
| Store Email Addresses > Sender Email | Addresses on your own domain, for example [email protected] |
Which Magento version, which SMTP method
The native transport is controlled by the same system/smtp/* config paths in every version, but the mail library underneath changed, and that affects the SSL field:
| Version | What to do |
|---|---|
| 2.4.5 and older | No SMTP in core (Transport field does not exist). Use one SMTP extension such as Mageplaza SMTP or MagePal SMTP and enter the same host, port, encryption and credentials in its settings. |
| 2.4.6, 2.4.7 | Native SMTP via laminas-mail. Port 587 + SSL TLS (STARTTLS) or port 465 + SSL SSL. |
| 2.4.8, 2.4.8-p1 | Mail moved to Symfony Mailer, and SSL = TLS opens an implicit TLS connection to a STARTTLS port. Port 587 + TLS fails with wrong version number (GitHub issue #39947). Upgrade or apply the patch from that issue; as a stopgap, port 587 with SSL None still upgrades to STARTTLS, because Symfony Mailer does that automatically when the server offers it. |
| 2.4.8-p2 and later | Fixed. Port 587 + TLS works; port 465 is treated as implicit TLS. |
Upgraded to 2.4.6+ with an SMTP extension still installed? Keep one in charge: the extension (core Transport left on Sendmail) or the native settings (extension disabled).
Step-by-step setup
- Buy an SMTP package on the Bulko SMTP Relay page and copy the username (
smtp_+ 16 hex characters) and password from the SMTP Access page of the dashboard. Verify your store domain under Sending domains (DKIM recordbk1._domainkey, optionalbncReturn-Path CNAME, DMARC). - In the Admin, go to Stores > Settings > Configuration > Advanced > System and expand Mail Sending Settings. Keep the scope switcher on Default Config.
- Clear Use system value where needed and set Disable Email Communications to No, Transport to SMTP, Host to
smtp.bulko.ioand Port (25) to587. The "(25)" in the label is just the default. - The SMTP-only fields appear once Transport is SMTP: enter Username and Password, set Auth to LOGIN and SSL to TLS. Leave Set Return-Path on No, as Adobe recommends. Click Save Config.
- Go to Stores > Settings > Configuration > General > Store Email Addresses and replace the
example.comdefaults in General Contact, Sales Representative and Customer Support (and Custom Email 1/2 if used) with Sender Name and Sender Email values on your verified domain. Order, invoice and shipment emails use Sales Representative by default. - Check Stores > Settings > Configuration > Sales > Sales Emails: each email type (Order, Invoice, Shipment, Credit Memo...) must be Enabled, and its "Email Sender" field points to one of the identities above.
- Flush the configuration cache (System > Cache Management or
bin/magento cache:clean config), then send a test as described below.
bin/magento: native SMTP settings with the password in env.php
# Native SMTP (Magento Open Source / Adobe Commerce 2.4.6+), Default Config scope
bin/magento config:set system/smtp/disable 0
bin/magento config:set system/smtp/transport smtp
bin/magento config:set system/smtp/host smtp.bulko.io
bin/magento config:set system/smtp/port 587
bin/magento config:set system/smtp/auth login
bin/magento config:set system/smtp/ssl tls
bin/magento config:set system/smtp/username smtp_xxxxxxxxxxxxxxxx
# Password: encrypted and written to app/etc/env.php instead of the database
bin/magento config:set --lock-env system/smtp/password 'YOUR_BULKO_PASSWORD'
# Sender of order emails (Sales Representative) on your own domain
bin/magento config:set trans_email/ident_sales/email [email protected]
bin/magento config:set trans_email/ident_general/email [email protected]
bin/magento cache:clean config
Same settings from the CLI, password in env.php
Every field above has a config path, so deployments can set SMTP with bin/magento config:set (see the snippet). Useful details:
--lock-envencrypts the password with your crypt key and writes it toapp/etc/env.phpinstead ofcore_config_data. The Admin field becomes read-only, and database dumps no longer carry the SMTP password.system/smtp/hostandsystem/smtp/portare declared environment-specific, soapp:config:dumpkeeps them out of the sharedconfig.php. Set them per environment so staging never mails real customers through the production relay.- Set the values at default scope. On 2.4.8 the Transport switch itself is read only from default scope, while host, credentials and SSL can be overridden per store view; a website-level Transport value is ignored.
- Values:
transport=smtporsendmail;auth=none,plain,login;ssl=none,ssl,tls.
Send a test email
The native settings have no "send test email" button, so test with a real email. The quickest: open any order in Sales > Orders, click Send Email and confirm "Are you sure you want to send an order email to customer?". With synchronous sending, success shows You sent the order email.; a transport failure shows We can't send the email order right now. and the real reason (for example a 535 reply or a TLS error) is logged in var/log/system.log or var/log/exception.log. With asynchronous sending enabled, the email leaves on the next cron run.
Then place a test order on the storefront (Check / Money order is enough) and confirm the customer receives the new order confirmation and any copy set under Send Order Email Copy To arrives. In the received message, view the original headers and check that SPF and DKIM pass for your domain.
Asynchronous sending and cron
Stores > Settings > Configuration > Sales > Sales Emails > General Settings > Asynchronous sending (sales_email/general/async_sending) changes when mail is sent. Disabled, the order email goes out during checkout, so a slow or failing SMTP connection is felt by the customer. Enabled, Magento only flags the order, and the cron jobs sales_send_order_emails, sales_send_order_invoice_emails, sales_send_order_shipment_emails and sales_send_order_creditmemo_emails (scheduled every minute) send the queued emails, up to Limit per cron run entities per run.
Cron is now part of your mail path. If emails stopped after enabling async sending, check that bin/magento cron:run is in the system crontab and look for these job codes in the cron_schedule table. Core sales emails are sent by cron, not by message queue consumers, so restarting consumers will not release them.
Troubleshooting
| Problem | Fix |
|---|---|
| "Unable to send mail. Please try again later." (2.4.6/2.4.7) or "Transport error: Unable to send mail at this time." (2.4.8+) | A generic wrapper: the real SMTP reply is logged in var/log/system.log or exception.log. Match that line against the rows below. |
| 535 Authentication failed | Username or password is wrong, has a stray space, or the stored password was overwritten when the form was saved from another scope. Copy both again from the SMTP Access page (the username starts with smtp_) and set Auth to LOGIN. More causes: /en/smtp-errors/535/. |
| "wrong version number" / "Connection could not be established with host ssl://..." | Encryption and port do not match. Use TLS with 587 or 2525, SSL with 465. On 2.4.8 and 2.4.8-p1 TLS on 587 is the known bug #39947: upgrade or patch, or set SSL to None on 587 as a stopgap. |
| Order emails stopped after enabling Asynchronous sending, nothing in the logs | Nothing was attempted: the sales_send_order_emails cron job is not running. Add bin/magento cron:run to the crontab and check cron_schedule. |
| Emails still sent from [email protected] or land in spam | The Store Email Addresses still have their defaults or use a free-mail domain. Set Sender Email to addresses on your own domain at every scope that overrides it, and verify that domain in Bulko with DKIM. |
FAQ
Does Magento 2 support SMTP without an extension?
Yes, from Magento Open Source and Adobe Commerce 2.4.6. Set Transport to SMTP under Stores > Settings > Configuration > Advanced > System > Mail Sending Settings. On 2.4.5 and older you still need an SMTP extension.
Can I keep the SMTP password out of the Magento database?
Yes. Set it with bin/magento config:set --lock-env system/smtp/password; Magento encrypts it and stores it in app/etc/env.php, and the Admin field becomes read-only.
Can I keep using Microsoft 365 or Gmail SMTP instead?
You can, but personal mailbox limits are not meant for store volume, and Microsoft is switching off Basic SMTP AUTH: see the Microsoft 365 basic auth guide at /en/smtp-relay/microsoft-365-basic-auth/. A relay with your own domain verified avoids both problems.
How many emails can a Magento store send through Bulko?
Up to 2,000 per day per SMTP access. Packages are one-time purchases with no subscription and unused emails never expire: 5,000 for $5, 20,000 for $15, 50,000 for $30 or 150,000 for $60.
Will customer replies reach me through Bulko?
No. Bulko is send-only, with no IMAP or POP3. Replies go to the Sender Email address, so use a mailbox you actually read at your existing mail provider.
Get SMTP credentials for Magento
One-time payment by card or crypto, no subscription. Unused emails never expire. 2,000 emails per day per SMTP account.
What you can send: Acceptable Use Policy.