How to configure Magento 2 to send an email using Gmail SMTP server
Hi everybody, I am Cuong, Welcome back to my Magento 2 tutorial video series.
#magento2tutorial
Today, I am going to show everybody a best practice, How to configure Magento 2 to send an email using Gmail SMTP server.
Why do you need to use Gmail SMTP server to send an email in Magento 2?
There are some reasons:
1. Your server does not allow sending an email.
2. You need to manage the emails are sent in your sent box.
3. You don’t want the emails you have sent it is put in the junk or spam of a customer.
Before doing this practice, you need to have a Gmail account and your Gmail account allows sending an email by SMTP. If you don’t set up your Gmail account yet, you can watch it here https://www.youtube.com/watch?v=7K5qFtMcmGk
Let’s do this practice, you need to follow steps by step:
Step 1: Install the new module named MagePal_GmailSmtpApp
– Using Composer, run the command lines following:
composer require magepal/magento2-gmailsmtpapp
php bin/magento setup:upgrade (Install new modules)
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy (deploy the static content)
php bin/magento cache:flush (flush caches)
Step 2: Configure Gmail SMTP server in Magento 2.
– Log into your Magento Admin, then goto Stores → Configuration → MagePal → SMTP Configuration
– Using the following information:
Authentication method: LOGIN
SSL type: SSL (Gmail / Google Apps)
SMTP Host: smtp.gmail.com
SMTP Port: 465
Set Reply-to: Yes
Set From: Yes
Step 3: Test and See the results
Oh, Yeah, it works perfectly.
Thank you for your watching. If you have any questions about this practice please feel free to leave a comment below.
Don’t forget to like, comment, share and subscribe to my channel for getting the latest videos.
Please do not hesitate to contact me if you need me to join your Magento project. My rate is $25/hour in Magento 1 and $30/hour in Magento 2.
by Magento 2 Vlogs
linux smtp server