cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup an external SMTP Service?

SOLVED

How to setup an external SMTP Service?

How to setup an external SMTP Service for magento2 "community-edition"  ?

 

edit:

 

I have Zoho Mail account
So I dont know were to put this info in magento 2 ?

 

 

SMTP Configuration settings for Zoho Mail - SSL

Outgoing Server Name: smtp.zoho.com
Port: 465
Security Type: SSL 

Require Authentication: Yes. 

Email address should match the email address/ aliases of the account, for which the authentication details are provided. 

 

SMTP Configuration settings for Zoho Mail - TLS

Outgoing Server Name: smtp.zoho.com
Port: 587
Security Type: TLS 

Require Authentication: Yes. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to setup an external SMTP Service?

I personally use Amavis_new filter for the spam and virus checking, not too load intensive and does a great job so far. Found a great (debian based) implementation article for you if you plan on going the same route: https://help.ubuntu.com/community/PostfixAmavisNew

 

For ssl, all you need to do is buy a reasonably priced cert from any CA auth (<$100/year) and force Postfix to use tls.

 

smtpd_tls_cert_file=/etc/ssl/certs/mycert_com.crt
smtpd_tls_key_file=/etc/ssl/private/mycert_com.key
smtpd_tls_CAfile=/etc/ssl/certs/mycert_com.ca-bundle
smtpd_use_tls = yes

# Also force tls on your relay host:

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:smtp_username:smtp_password
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
relayhost = [smtp.zoho.com]:587

Something like that!

 

Doesn't take much as you can see and you'll end up with a (semi) solid mail system for Magento.

 

RE outgoing emails, for a commercial store then yes they need to be scanned. I always appreciate those who does regardless. It's easy to see if the emails are received & sent using tls and whether they are scanned by looking at the header. Beware some customers do actually check these details and if not up to standard they will fire back at you.

View solution in original post

10 REPLIES 10

Re: How to setup an external SMTP Service?

RE services; the ones who handles google cloud's customers for instance are Sendgrid and Mailgun. They both provide a non-standard port number (e.g. 2525) among others. Both services supporting TLS < essential.  And its FREE... if you don't abuse!

Re: How to setup an external SMTP Service?

I have Zoho Mail account
So I dont know were to put this info in magento 2 ?

 

 

SMTP Configuration settings for Zoho Mail - SSL

Outgoing Server Name: smtp.zoho.com
Port: 465
Security Type: SSL 

Require Authentication: Yes. 

Email address should match the email address/ aliases of the account, for which the authentication details are provided. 

 

SMTP Configuration settings for Zoho Mail - TLS

Outgoing Server Name: smtp.zoho.com
Port: 587
Security Type: TLS 

Require Authentication: Yes. 

Re: How to setup an external SMTP Service?

I see... was sure you were only looking for smtp 'services' as per your original post.

 

Magento by itself won't handle your remote(zoho) smtp authentication and even less the encryption that today's (aware) customers require. You'll need minimum a MTA running onto the same server that your Magento store runs onto. Now whether this MTA relays or send mail directly, it will need to maintain CA trusted certification (SSL) and have a reliable TLS handshake with its receiving mail servers. Also crucial to yours and customer's security/reputation is in&outbound virus checking, spam control and lastly an IDS installed on the mail server port. Others > spf and dkim, etc.

 

Not all that Magento plug & play sadly but the good news for you is there are plenty of well detailed papers online RE available "MTA", how to install and secure them.

Re: How to setup an external SMTP Service?

 

So i setup 

  • Postfix " in my server " to send email from magento to  my customers via protocol SMTP.
  • And receive email from my customers with external " Zoho Mail server" by add mx.zoho.com to DNS
  • wiht SPF at my DNS
  • v=spf1 a:mydomain.com mx include:zoho.com ~all
  • " so magento email do not go to spam " Smiley Wink

 

  • My Firewall  " deny all incoming except port 80+443+ssh " 

 

-----------

 

According to your suggestion

I will work to add:

 

  • ssl to my SMTP 
  • outbound virus checking "Is it necessary for vps server operates just magento2web site ? "

Re: How to setup an external SMTP Service?

 

So i setup 

  • Postfix " in my server " to send email from magento to  my customers via protocol SMTP.
  • And receive email from my customers with external " Zoho Mail server" by add mx.zoho.com to DNS
  • wiht SPF at my DNS

 

v=spf1 a:mydomain.com mx include:zoho.com ~all

 

" so magento email do not go to spam " Smiley Wink

 

  • My Firewall  " deny all incoming except port 80+443+ssh " 

 

-----------

 

According to your suggestion

I will work to add:

 

  • ssl to my SMTP 
  • outbound virus checking "Is it necessary for vps server which operates just magento2 website ? "

Re: How to setup an external SMTP Service?

I personally use Amavis_new filter for the spam and virus checking, not too load intensive and does a great job so far. Found a great (debian based) implementation article for you if you plan on going the same route: https://help.ubuntu.com/community/PostfixAmavisNew

 

For ssl, all you need to do is buy a reasonably priced cert from any CA auth (<$100/year) and force Postfix to use tls.

 

smtpd_tls_cert_file=/etc/ssl/certs/mycert_com.crt
smtpd_tls_key_file=/etc/ssl/private/mycert_com.key
smtpd_tls_CAfile=/etc/ssl/certs/mycert_com.ca-bundle
smtpd_use_tls = yes

# Also force tls on your relay host:

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:smtp_username:smtp_password
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
relayhost = [smtp.zoho.com]:587

Something like that!

 

Doesn't take much as you can see and you'll end up with a (semi) solid mail system for Magento.

 

RE outgoing emails, for a commercial store then yes they need to be scanned. I always appreciate those who does regardless. It's easy to see if the emails are received & sent using tls and whether they are scanned by looking at the header. Beware some customers do actually check these details and if not up to standard they will fire back at you.

Re: How to setup an external SMTP Service?

Hi,

 

To setup SMTP you can follow these simple steps:

 

Step 1: Install SMTP 

 

Run the following command in Magento 2 root folder

composer require mageplaza/module-smtp
php bin/magento setup:upgrade

It will automatically install SMTP module

 

Step 2: Configuration

 

Still from the same structure with General Configuration, scroll down to see SMTP Configuration Options

smtp for magento 2

  • In SMTP Provider field, at the moment we support provider nearly 30 SMTP email service providers so feel free to choose your appropriate provider. Click Auto Fill button to fill Host, Port, Authentication and Protocol automatically, which are compatible with the SMTP provider you had chosen.

  • At Host field, type your Support Host name and ID Address. You can also custom STMP Provider’s Host name at here. If you had clicked Auto fill button at the above field, you can give this step a free pass.

  • Port is a specific gate where emails will be sent through. You can also pass this step if you had choose Auto fill from the first place. In general, there will be 3 kinds of Default Port

    • Port 25: Emails sent by other Protocol which different SSL will be sent through this portal
    • Port 465: Emails sent by other Protocol SSL will be sent through this portal
    • Port 578: Emails sent by other Protocol TLS will be sent through this portal
  • Authentication field is place where you decide an authentication method. If you hadn’t clicked Auto fill button before, please note those basic methods

    • Login: Authentication by login to the account through Username and Password that will be filled in the next field. Most of provider will require this method.
    • Plain
    • CRAM-MD5
  • Account: where you enter the account name matching format of the SMTP Provider you had selected

  • Password: password of the Username. After saving, the password will be encrypted into ******

  • Protocol: pass this step if you had chosen Auto fill, or you can select one of the providing protocol below here

    • None: when you select this protocol, you have to accept all the risk may occur in the process of sending.
    • SSL stands for Secure Socket Layer. This protocol ensures that all data exchanged between the web server and the browser is secure and stay safe.
    • TLS means Transport Layer Security. This protocol secures data or messages and validates the integrity of messages through message authentication codes.
  • Return-path email: leave it empty if you want to ignore this.

  • Test email recipient: This is the field for you to test the operation of the extension. After filling all fields, click Test Now button. If the information entered is valid, a successful email notification will be sent from Username to Email Test. That email will have the following content:

smtp test result

 

Re: How to setup an external SMTP Service?

Hi , there i also confused about an external SMTP by Zoho mail  ,about  zoho partners community edition details . if anyone have good and possible solution please provide here ! 

Re: How to setup an external SMTP Service?

external smtp service may require a pure setup and guideline from zoho consultants. you may look at here for more details for smtp services