Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers

Overview

Magento 2 SMTP Extension - Gmail, G Suite, Amazon SES, Office 365, Mailgun, SendGrid, Mandrill and other SMTP servers.

Total Downloads Latest Stable Version GitHub stars GitHub forks

For Magento 2.0.x, 2.1.x, 2.2.x, 2.3.x and 2.4.x

Configure Magento 2 to send all transactional emails using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 or any other SMTP servers.

Magento SMTP Extension

Sending transactional emails to customers is a vital part of running an e-commerce store. Our free custom Magento extension integrates with all major email service providers and third-party SMTP servers to reliably deliver messages to customers' inboxes.

What is SMTP - Simple Mail Transfer Protocol

SMTP or Simple Mail Transfer Protocol allows you to send emails from your Magento 2 store through a specific third-party mail SMTP server. For example, if you want to use your Gmail, Amazon, Microsoft or any other mail server account to send email from your Magento web store, all you need is to configure that mail server setting in our extension in Magento without having to do any complex server configuration.

Magento SMTP Email Extension

Why use a Custom SMTP Server with Magento

By default, most hosting companies' mail servers are configured to send email from unauthorized senders which prevents emails from reliable delivered to recipients. Therefore, most Magento store owners struggle to limit the number of transactional emails that end up in clients' junk mail. Take full control of your email sending settings in Magento 2 and reduce sending emails to your valuable customers' junk mail folder. Emails are delivered instantaneously to their intended recipients without delays or get trap in the spam folder.

Out of the box, Magento 2 doesn't provide the ability to specify your custom SMTP settings for outgoing emails using an external SMTP server. Using this extension bridges the gap and allows your Magento store to connect to your preferred email provider securely and easily.

All you need is either an (i) free Gmail account, (ii) paid Google Apps account or any other SMTP service (i.e Amazon Simple Email Service / Amazon SES, Microsoft Office365).

Learn more about our custom SMTP extension.

Benefits of using Gmail SMTP

Since Google's, Gmail and G Suite SMTP server does not use Port 25, you'll reduce the probability that an ISP might block your email or flag it as SPAM. Also, all your emails sent from Magento will be searchable and backed-up in your email account on Google's servers.

Features

  • Send emails through virtually any external SMTP server from your Magento store
  • Easily configure Magento 2 SMTP settings from within Magento2 store admin
  • Complete control of custom SMTP server settings: Hostname, Port, Username, Password, ...
  • Self-test option, which lets you verify your email credentials are correct before saving
  • Support Multi-store, configurable different email providers/accounts per store
  • Support secure SMTP servers: TLS / SSL, Plain-text, username/password, CRAM-MD5 authentication
  • Customize email headers: From / Reply-To / Return-Path
  • Easily disable/enable our extension from admin
  • Developer Friendly
  • Integrate with any third-party SMTP server

Get more from your order confirmation emails by promoting other complementary products and services. Learn more about our new Enhanced Transactional Email extension.

Documentation

SMTP Service Providers

  • Gmail
  • Google App
  • G Suite
  • Amazon Simple Email Service (SES)
  • Microsoft Office365
  • Outlook
  • SparkPost
  • GoDaddy
  • Mandrill
  • MailGun
  • SendGrid
  • Elastic Email
  • Hotmail
  • AOL Mail
  • Yahoo Mail
  • AT&T
  • Verizon
  • Postmark
  • O2 Mail
  • Zoho
  • Mailjet
  • Mail.com
  • Your Company SMTP Server
  • and many other SMTP servers

How to Install Magento SMTP Extension

Using Composer (recommended)
composer require magepal/magento2-gmailsmtpapp

Contribution

Want to contribute to this extension? The quickest way is to open a pull request on GitHub.

Support

If you encounter any problems or bugs, please open an issue on GitHub. For fast Premium Support visit our Custom SMTP Extension product page for detail.

Need help setting up or want to customize this extension to meet your business needs? Please email [email protected] and if we like your idea we will add this feature for free or at a discounted rate.

Magento 2 Extensions

© MagePal LLC. | www.magepal.com

Comments
  • 5.7.8 Username and Password not accepted after save config on magento2

    5.7.8 Username and Password not accepted after save config on magento2

    its working before i save the config ,i try the mail setting test and it works ,after i saved the config on magento2 i try again mail test , i get 5.7.8 Username and Password not accepted,how i can fix it

    opened by knidie 39
  • Not working on Magento 2.3.5

    Not working on Magento 2.3.5

    Magento version #:

    2.3.5

    Edition (EE, CE, OS, etc):

    EE

    Expected behavior:

    when placing orders, email confirmations are sent

    Actual behavior:

    Fatal Error: 'Cannot declare class Zend_Mail_Transport_Smtp, because the name is already in use'

    Steps to reproduce:

    Place order via FE or admin

    Preconditions

    Magento 2.3.5 has Zend Framework replaced by Laminas

    opened by apedicdev 29
  • Magento 2.3.3 - Invalid header value detected

    Magento 2.3.3 - Invalid header value detected

    Magento version #:

    2.3.3

    Edition (EE, CE, OS, etc):

    CE

    Expected behavior:

    Actual behavior:

    Steps to reproduce:

    Preconditions

    SMTP Configuration version 2.6.6 - it's not possible to send emails to receipients containing special characters in their names.

    main.CRITICAL: Invalid header value detected {"exception":"[object] (Zend\Mail\Header\Exception\RuntimeException(code: 0): Invalid header value detected at /var/www/magento2/vendor/zendframework/zend-mail/src/Header/HeaderValue.php:112)"} []

    opened by srenon 29
  • Could not open socket

    Could not open socket

    I have tried both SSL and TLS. I have tried both smtp.gmail.com and smtp.googlemail.com I have tried enabling "Allow less secure apps" in my gmail account

    I am using this on a Fedora 24 box, fully updated. PHP version 5.6.27 ZEND engine 2.6.0 Magento 2.1.2

    Nothing seems to work, always get the same error "Could not open socket". Am I missing something? Please let me know if there's something else I should try to get this working.

    Thanks.

    opened by bfsmith07 28
  • Test Mail Working well usgin the extension but magento 2 is not sending any emails

    Test Mail Working well usgin the extension but magento 2 is not sending any emails

    I have Magento version 2.2.0 (Multi-store)

    PHP Version 7.0.27 & I have used Zoho SMTP

    Test mail is working well but any transanal mail is not sending.

    opened by rintish 24
  • Issue when compiling site

    Issue when compiling site

    I just followed your instructions to install this app. The installation appears to go ok except I'm getting the following error when running: magenta setup:di:compile

    I'm now unable to use my site (white screen on admin login). Any ideas???????

    Errors during compilation: MagePal\GmailSmtpApp\Controller\Adminhtml\Test\Index Extra parameters passed to parent construct: $dataHelper. File: /var/www/html/magento/app/code/MagePal/GmailSmtpApp/Controller/Adminhtml/Test/Index.php MagePal\GmailSmtpApp\Block\Adminhtml\System\Config\TestButton Incorrect dependency in class MagePal\GmailSmtpApp\Block\Adminhtml\System\Config\TestButton in /var/www/html/magento/app/code/MagePal/GmailSmtpApp/Block/Adminhtml/System/Config/TestButton.php \Magento\Framework\UrlInterface already exists in context object Total Errors Count: 2 Errors during compilation: MagePal\GmailSmtpApp\Controller\Adminhtml\Test\Index Extra parameters passed to parent construct: $dataHelper. File: /var/www/html/magento/app/code/MagePal/GmailSmtpApp/Controller/Adminhtml/Test/Index.php MagePal\GmailSmtpApp\Block\Adminhtml\System\Config\TestButton Incorrect dependency in class MagePal\GmailSmtpApp\Block\Adminhtml\System\Config\TestButton in /var/www/html/magento/app/code/MagePal/GmailSmtpApp/Block/Adminhtml/System/Config/TestButton.php \Magento\Framework\UrlInterface already exists in context object Total Errors Count: 2 Errors during compilation: MagePal\GmailSmtpApp\Controller\Adminhtml\Test\Index Extra parameters passed to parent construct: $dataHelper. File: /var/www/html/magento/app/code/MagePal/GmailSmtpApp/Controller/Adminhtml/Test/Index.php MagePal\GmailSmtpApp\Block\Adminhtml\System\Config\TestButton Incorrect dependency in class MagePal\GmailSmtpApp\Block\Adminhtml\System\Config\TestButton in /var/www/html/magento/app/code/MagePal/GmailSmtpApp/Block/Adminhtml/System/Config/TestButton.php \Magento\Framework\UrlInterface already exists in context object Total Errors Count: 2

    opened by 9SL9 24
  • Could Not Open Socket

    Could Not Open Socket

    I tried to configure my gmail account for sending emails on my Windows machine. But when sending test email, it gives following error: http://joxi.ru/V2VBaKvh0oXK62

    Here are my configurations: http://joxi.ru/Dr86vE9uk8LM62

    I have enable Access for less secure apps in my gmail account: http://joxi.ru/E2pdVgnfBNpGN2

    My PHP streams: http://joxi.ru/krDO8Dkt0jy4QA

    Is this something related to my gmail account?

    Thanks

    opened by webspeaks 21
  • Will not install: composer require magepal/magento2-gmailsmtpapp fails

    Will not install: composer require magepal/magento2-gmailsmtpapp fails

    when I run composer require magepal/magento2-gmailsmtpapp

    I get the following error bitnami@ip-172-31-17-133:~$ composer require magepal/magento2-gmailsmtpapp Using version ^1.4 for magepal/magento2-gmailsmtpapp ./composer.json has been created Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

    Problem 1 - Installation request for magepal/magento2-gmailsmtpapp ^1.4 -> satisfiable by magepal/magento2-gmailsmtpapp[1.4.0]. - magepal/magento2-gmailsmtpapp 1.4.0 requires magento/module-backend 100.0.|100.1. -> no matching package found.

    Potential causes:

    Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

    Installation failed, deleting ./composer.json.

    Magento 2.1.2, BitNami, AWS, (fresh install)

    opened by deckside 20
  • Blocking Orders from being placed

    Blocking Orders from being placed

    So I've installed this and it seems to work really well. I've been testing it and emails work fine. Forgotten password sends off an email. Changing a password email goes out.

    But then I try to place an order. If you place an order from the frontend it just says that the order failed. And I had no idea what was causing it. But then finally I placed an order from the admin and it came with a more specific error "Invalid MAIL FROM address provided". So I realized it was this module. Disable this module and I can place orders on the frontend and admin.

    I don't understand why it's getting this error though. I've verified the domain and several emails in Amazon. Not to mention emails are sending just fine. Everything except order emails. This will not send an order email at all, and prevents any orders from even being placed.

    I've played with what little settings there are such as Set Reply to, Set Return Path, Set From. And none of the settings change anything whether it's Yes or No.

    Is there some log I could be checking? I don't even know what email it's trying, and why is it different than every other email that goes out? Maybe I can change the Order email some how? Although all the Magento from emails are set identical and it's verified in Amazon. Seems to be something strange going on, any help would be appreciated.

    opened by InternetMedicineMan 17
  • Connection timed out in Transport.php:78

    Connection timed out in Transport.php:78

    Hi, great tool. But i get a Timeout.

    Next Magento\Framework\Exception\MailException: Connection timed out in /home/forge/domain.com/vendor/magepal/magento2-gmailsmtpapp/Model/Transport.php:78
    Stack trace:
    #0 /home/forge/domain.com/app/code/Magento/Customer/Model/EmailNotification.php(239): MagePal\GmailSmtpApp\Model\Transport->sendMessage()
    #1 /home/forge/domain.com/app/code/Magento/Customer/Model/EmailNotification.php(320): Magento\Customer\Model\EmailNotification->sendEmailTemplate(Object(Magento\Customer\Model\Data\Customer), 'customer/passwo...', 'customer/passwo...', Array, '1')
    #2 /home/forge/domain.com/app/code/Magento/Customer/Model/AccountManagement.php(507): Magento\Customer\Model\EmailNotification->passwordResetConfirmation(Object(Magento\Customer\Model\Data\Customer))
    #3 [internal function]: Magento\Customer\Model\AccountManagement->initiatePasswordReset('k.veen@microdes...', 'email_reset', '1')
    #4 /home/forge/domain.com/lib/internal/Magento/Framework/Interception/Interceptor.php(146): call_user_func_array(Array, Array)
    #5 /home/forge/domain.com/var/generation/Magento/Customer/Model/AccountManagement/Interceptor.php(91): Magento\Customer\Model\AccountManagement\Interceptor->___callPlugins('initiatePasswor...', Array, Array)
    #6 /home/forge/domain.com/app/code/Magento/Customer/Controller/Account/ForgotPasswordPost.php(72): Magento\Customer\Model\AccountManagement\Interceptor->initiatePasswordReset('k.veen@microdes...', 'email_reset')
    #7 /home/forge/domain.com/var/generation/Magento/Customer/Controller/Account/ForgotPasswordPost/Interceptor.php(25): Magento\Customer\Controller\Account\ForgotPasswordPost->execute()
    #8 /home/forge/domain.com/lib/internal/Magento/Framework/App/Action/Action.php(102): Magento\Customer\Controller\Account\ForgotPasswordPost\Interceptor->execute()
    #9 [internal function]: Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
    
    
    opened by kayintveen 17
  • Warning: include_once(Zend/Mail/Protocol/Smtp/Auth/LOGIN.php)

    Warning: include_once(Zend/Mail/Protocol/Smtp/Auth/LOGIN.php)

    Thanks for this module. Install looks fine, I'm able to enter my credentials in Store/Config/Advanced/System, but when I try to send an email I'm getting this error:

    main.ERROR: Warning: include_once(Zend/Mail/Protocol/Smtp/Auth/LOGIN.php): failed to open stream: No such file or directory in /var/www/magento2/vendor/magento/zendframework1/library/Zend/Loader.php on line 134

    opened by mswaidan 16
  • Test Email Server Configuration - Leave blank to use Username instead

    Test Email Server Configuration - Leave blank to use Username instead

    Instructions in settings:

    Test Email Server Configuration Settings From Email Address (Leave blank to use Username instead)

    When actually leaving that field blank, we get:

    o/var/log/system.log <==
    [2022-10-30T15:19:17.666005+00:00] main.CRITICAL: Laminas\Mail\Exception\InvalidArgumentException: The input is not a valid email address. Use the basic format local-part@hostname in magento/vendor/laminas/laminas-mail/src/Address.php:74
    Stack trace:
    #0 magento/vendor/laminas/laminas-mail/src/AddressList.php(236): Laminas\Mail\Address->__construct()
    #1 magento/vendor/laminas/laminas-mail/src/AddressList.php(29): Laminas\Mail\AddressList->createAddress()
    #2 magento/vendor/laminas/laminas-mail/src/Message.php(538): Laminas\Mail\AddressList->add()
    #3 magento/vendor/laminas/laminas-mail/src/Message.php(131): Laminas\Mail\Message->updateAddressList()
    #4 magento/vendor/magepal/magento2-gmailsmtpapp/Block/Adminhtml/ValidateConfig.php(300): Laminas\Mail\Message->addFrom()
    #5 magento/vendor/magepal/magento2-gmailsmtpapp/Block/Adminhtml/ValidateConfig.php(214): MagePal\GmailSmtpApp\Block\Adminhtml\ValidateConfig->validateServerEmailSetting()
    #6 magento/vendor/magepal/magento2-gmailsmtpapp/view/adminhtml/templates/validateConfig/result.phtml(164): MagePal\GmailSmtpApp\Block\Adminhtml\ValidateConfig->verify()
    #7 magento/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/domains/y...')
    
    
    opened by YiffyToys 0
  • $proceed() is not always called avoiding other plugins to be executed

    $proceed() is not always called avoiding other plugins to be executed

    As we can see on line 75 of TransportPlugin.php, the $proceed() is not always called.

        public function aroundSendMessage(
            TransportInterface $subject,
            Closure $proceed
        ) {
            if ($this->dataHelper->isActive()) {
                if (method_exists($subject, 'getStoreId')) {
                    $this->storeModel->setStoreId($subject->getStoreId());
                }
    
                $message = $subject->getMessage();
    
                if ($message instanceof Message || $message instanceof EmailMessageInterface) {
                    $smtp = $this->smtpFactory->create(
                        ['dataHelper' => $this->dataHelper, 'storeModel' => $this->storeModel]
                    );
                    $smtp->sendSmtpMessage($message);
                } else {
                    $proceed();
                }
            } else {
                $proceed();
            }
        }
    

    Quoting the around plugin docs:

    If the around method does not call the callable, it will prevent the execution of all the plugins next in the chain and the original method call.

    I still haven't confirmed, but this can result in problems related to core saving address plugins and later avoiding the customer to place a second order using the same address.

    opened by r-martins 0
  • SMTP Configuration to have custom

    SMTP Configuration to have custom "From Address'

    I tried many settings, but it always shows the email from GMAIL Email. Here's what settings look like CleanShot 2022-06-19 at 11 31 39@2x

    I want to have "From Address" to take it from Magento Store Emails or Custom one. CleanShot 2022-06-19 at 11 42 25@2x

    opened by MagePsycho 0
  • [FEATURE REQUEST] Support email logging

    [FEATURE REQUEST] Support email logging

    Magento version #:

    All versions

    Edition (EE, CE, OS, etc):

    CE or EE

    Expected behavior:

    Support email logging

    Actual behavior:

    Steps to reproduce:

    Preconditions

    opened by tuyennn 0
  • Gmail end of support third party applications that use username and password

    Gmail end of support third party applications that use username and password

    Hi!!

    I have seen the note in the main README of the Google notice in which Google says will stop supporting third party applications that use username and password. But I don't see more information about that, in that case I understand that we will not be able to use this module for that purpose anymore, we should look for an alternative that makes login with oauth? Is there any plan to implement it?

    Thank you very much!

    opened by mbernabeu 4
Releases(2.9.0)
Owner
MagePal :: Magento Extensions
MagePal designs and delivers high quality Magento 2 extensions! 1,488,691+ downloads.
MagePal :: Magento Extensions
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.

TARS - A Linux Foundation Project TARS Foundation Official Website TARS Project Official Website WeChat Group: TARS01 WeChat Offical Account: TarsClou

THE TARS FOUNDATION PROJECTS 9.6k Jan 1, 2023
Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery

Mobile App Version Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery. Installation Add to co

Omer Salaj 11 Mar 15, 2022
Creating data transfer objects with the power of php objects. No php attributes, no reflection api, and no other under the hook work.

Super Simple DTO Creating data transfer objects with the power of php objects. No php attributes, no reflection api, and no other under the hook work.

Mohammed Manssour 8 Jun 8, 2023
This plugin allows you to create many-to-many relationships between pages in Kirby and synchronizes them on both sides.

Kirby 3 Many To Many Field This plugin allows you to create many-to-many relationships between pages in Kirby.

Jonas Holfeld 41 Nov 19, 2022
> Create e-wallet, send money, withdraw and check balance all via USSD protocol

Mobile Money USSD solution Create e-wallet, send money, withdraw and check balance all via USSD protocol Create e-wallet Step 1 Step 2 Step 3 Step 4 S

Emmanuel HAKORIMANA 1 Nov 3, 2021
Block ads for other servers.

[] NoAdvertisings| v0.0.1 Block ads for other servers. Features Block server ads. Easy to setup. Block server address ads when chatting, using command

Nguyễn Hiếu 4 Aug 28, 2022
Best regular expression for gmail

best regular expression for gmail Gmail Regular expression with all details (not start with dot,number , is it possible to use multiple dot but not in

null 3 Feb 2, 2022
Unterschiedliche Versand-Profile für den PHPMailer in REDAXO (REXMailer) für unterschiedliche Absende-Adressen und/oder SMTP-Postfächer

Mailer Profile für REDAXO 5 Erweitert das Core-Addon phpmailer um die Möglichkeit, unterschiedliche Absende-Profile und Postfächer-Konfigurationen vor

alex+ Informationsdesign 7 Dec 22, 2022
This tools helps you with Collectors in DependecyInjection, Console shortcuts, ParameterProvider as service and many more.

Package Builder This tools helps you with Collectors in DependecyInjection, Console shortcuts, ParameterProvider as service and many more. Install com

null 168 Dec 22, 2022
PHP Protobuf - Google's Protocol Buffers for PHP

This repository is no longer maintained Since Google's official Protocol Buffers supports PHP language, it's unjustifiable to maintain this project. P

Allegro Tech 912 Dec 16, 2022
Google Analytics Measurement Protocol Package for Symfony

Google Analytics Measurement Protocol Package for Symfony. Supports all GA Measurement Protocol API methods.

Four Labs 31 Jan 5, 2023
This repository demonstrates exemplary implementation of chat using HTTP and Websocket servers in PHP using Kraken Framework components.

This repository demonstrates exemplary implementation of chat using HTTP and Websocket servers in PHP using Kraken Framework components.

Kraken 48 Aug 11, 2021
A Symfony Feature Flag Bundle which easily allows you to configure and use your favorite feature flag provider.

Metro Markets FF Metro Markets FF is a Feature Flag Symfony Bundle. It easily allows you to configure and use your favorite feature flag provider. Ins

METRO Markets 14 May 23, 2022
Rah privileges - Configure Textpattern CMS' user-group privileges through Preferences panel

rah_privileges Packagist | Donate Configure admin-side user-group permissions from Textpattern CMS’ preferences panel. Install Using Composer: $ compo

Jukka Svahn 4 Apr 16, 2022
A standalone Amazon S3 (REST) client for PHP 5/CURL

Amazon S3 PHP Class Usage OO method (e,g; $s3->getObject(...)): $s3 = new S3($awsAccessKey, $awsSecretKey); Statically (e,g; S3::getObject(...)): S3::

Donovan Schönknecht 1k Jan 3, 2023
WebScraping que busca 15 produtos em destaque na amazon e mercado livre, ordenando pelo menor preço.

WebScraping WebScraping que busca 15 produtos em destaque na amazon e mercado livre, ordenando pelo menor preço. Na criação do site foram usados Html,

Welson 3 Nov 10, 2022