User Tools

Site Tools


Sidebar

magento_2:smtp-email-settings

For more details see the Delete Order for Magento 2 extension page.

SMTP Email Settings for Magento 2

Send only reliable emails from a popular local hosting or a custom Magento 2 SMTP server. Run tests before emails dispatch to make sure that customers and partners receive all emails you send.

  • Secure Magento 2 SMTP authentication and connection
  • Pre-defined settings for popular email service providers
  • Debug mode for email testing
  • Log all sent emails and view any message in detail
  • Significantly decrease email rejection

Extension Configuration

To configure the module please go to StoresConfigurationSMTP Email Settings

General Settings

Enable SMTP For E-mail - When set to ‘No’ this setting disables all features of the module including debug and emails log.

Log Outgoing Mail - Set this option to ‘Yes’ to log all emails sent from Magento. The feature enables you to view the list of the emails, including the contents at any time.

Enable Debug Mode - Debug information can help to set up emails dispatch. Please disable the debug option when emails sending works properly.

Disable E-mail Delivery - Set this option to ‘No’ to send out emails. When set to ‘Yes’, emails will not be sent. The system will ‘pretend’ that it is sending emails - the messages will still be added to the log and you will see all debug info. It’s helpful for testing the system.

Get 14 additional detailed report types with the Magento 2 reports extension.

SMTP Configuration

SMTP Provider - Choose your SMTP provider and click ‘Autofill’ to fill in some fields automatically. Select ‘Other’ if you own a server.

Server Address - Specify the hostname or IP address of the server.

Port - Define the port number.

Authentication Method - Set to Login/Password if you want the authentication to be enabled.

Login - Specify your login in this field.

Password - Define a password for your login.

Connection Security - Specify the protocol used for secure communication (the field can be filled automatically).

Use Another Email Sender - Choose Yes, if you want to replace the sender email (the option is available only when the SMTP Provider is defined as “Other”).

When Use Another Email Sender is set to Yes, two additional fields will appear: Sender Email and Sender Name.

Sender Email - Define a new sender email for which the original sender email will be changed.

Sender Name - Specify the name of a new sender.

Send Test E-mail To - Specify an email for the test and click the ‘Check Connection’ button to run a test and make sure that you filled in the correct data and the setup works well. As a result, you should get the ‘Connection Successful’ message and receive a test email.


How to replace an email sender?

Changing of email sender will help you to avoid email overflowing: the email you usually use won't be shown to customers - they will see another sender email instead.

Note! The option, that allows you to change the email sender, is available only if you have your own SMTP server.

Complete two easy steps to replace the sender's email:

Step 1. Specify the value Other in the field SMTP Provider .

Step 2. Set the option Use another Email Sender to Yes, then specify the Sender Email and the Sender Name fields. You can use either an existing email or a fake one.

Make sure, you use the same domain, from which you send the mails. If the domains will differ, your mail will be considered as spam and your mail server will get into the ban.

Automatic Log Clearing

Old log records can be removed after a certain period (in days). If you set the auto clean to 0, the option won't be applied.


Sent Emails Log

To see the list of sent emails please go to ReportsSMTP Email Settings sectionSMTP Sent Emails Log.

In the log you can see the email subject, the date when it was sent, recipient email, and email status. Click ‘View’ to see the email content.

View Sent Emails

After clicking 'View' on the Sent Emails grid you can see the content of the selected email.


Debug Log

To see the extension debug log please go to ReportsSMTP Email Settings sectionSMTP Debug Log.

At this page you can find out if emails are sent and what errors if any, occur. This data will help you to configure the module. It’s recommended to disable the Debug Mode once you’ve successfully setup the module and run the necessary tests.

What is SPF Record and How to Configure it

Please be aware that it is not mandatory to setup SPF record, however doing so you will increase the chance of email delivery.

Sender Policy Framework (SPF) is an email validation system created to prevent email spam on the Internet by detecting email spoofing (creation of emails with forged sender addresses).

SPF technology consists of two parts - SPF-record in DNS (Domain Name System) zone of your domain; - email server component of the message recipient or the component of its spam combating system; SPF record is configured by email sender. It contains information about the servers that are allowed to send emails from your domain name.

Although SPF record is optional, today due to the spam issue most email servers may refuse to accept your email without this record or mark it as suspicious or unwanted.


How to set SPF record for your own SMTP server

If you use your own email server to send emails for your domain (below we use the example.com domain for demonstration) that has IPv4 address xxxx, the SPF record will look like this:

example.com. IN TXT “v=spf1 a mx ip4:x.x.x.x ~all”

example.com. IN SPF “v=spf1 a mx ip4:x.x.x.x ~all”

If your server has more than one IPv4 address, you can list them like that: “v=spf1 a mx ip4:x.x.x.x ip4:y.y.y.y ip4:z.z.z.z -all”.

If you use IPv6 addresses, the record will be: “ip6:xx:yy::zz”, where “xx:yy::zz” is the IPv6 of your email server. In this example, the SPF record allows sending emails for the example.com domain from the IP address specified in the «A» record of the example.com domain (a), mail-exchangers of the example.com domain (mx) and from IP address x.x.x.x (ip4:x.x.x.x). The recipient’s server will make the decision whether to mark as spam emails from other senders (~ all).

To restrict sending emails from senders not listed in the SPF record, you can use the “-all” option instead of “~all”. However, in case there are any inaccuracies in your settings you risk to restrict receiving of your mail.

Therefore, use this option only if you are sure that all your settings are correct.


How to set SPF record for Google Apps

If you use Google Apps service to send emails for your domain, the SPF record settings will be slightly different.

The addresses of the email servers that are used by Google Apps can vary and consequently you’ll have to enable Google Apps SPF configuration.

In case you use Google Apps to receive emails, but send emails using your own SMTP server you need to specify it in the SPF record:

example.com. IN TXT “v=spf1 a mx ip4:x.x.x.x include:_spf.google.com ~all”

example.com. IN SPF “v=spf1 a mx ip4:x.x.x.x include:_spf.google.com ~all”

If you use Google Apps Service both for sending and receiving emails, the SPF record will be the following:

example.com. IN TXT “v=spf1 include:_spf.google.com ~all”

example.com. IN SPF “v=spf1 include:_spf.google.com ~all”

To get more details about SPF settings for Google Apps, click here.

Find out how to install the SMTP Email Settings extension via Composer.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/smtp-email-settings.txt · Last modified: 2018/09/21 09:45 by milosh