Skip to content

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

Notifications You must be signed in to change notification settings

angrobg/module-email

 
 

Repository files navigation

Email

Magento2 module for email providers integration.

example

Following email services are supported:

  • Amazon SES
  • Gmail
  • Mandrill
  • Sendmail
  • Manual SMTP settings

Installation

Run the following commands:

cd <magento_root>
composer require swissup/module-email
bin/magento module:enable Swissup_Email
bin/magento setup:upgrade
bin/magento setup:di:compile

Usage

  1. Navigate to "Marketing → Communications → Email Services" example1
  2. Press "Add New" button
  3. Create service
    • Specify the Name
    • Choose Type from drop-down
    • Fill all required fields
    • Press "Check Service" button and wait for response
    • If everything works fine, press "Save" button example
  4. Navigate "Stores → Configurations → Advanced → System → Mail Sending Settings"
  5. Select new service in the "Default Transport Email Service" drop-down config
  6. Save

Logging

  1. Navigate "Stores → Configurations → Advanced → System → Mail Sending Settings"
  2. "Logging Enable" set Yes
  3. Navigate to "Marketing → Communications → Email Logs"

I recently needed to modify the emails that a client project sends out. It was set up to send via SMTP and so the easiest way to do this for me was to add a local MailHog instance and point the application at it.

Manually running via Docker The quickest and easiest way to do this is via Docker.

Manually, we can do:

$ docker run -p 8025:8025 -p 1025:1025 mailhog/mailhog

This will run MailHog with the SMTP port exposed on localhost port 1025 and the web interface on 8025.

Now you can configure the app’s SMTP config and away you go.

Option Value
Type Smtp
Host 0.0.0.0 or mailhog
Port 1025
Auth Type None
Secure None

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 97.7%
  • JavaScript 2.3%