User Tools

Site Tools


magento2:extensions:magento-2-smtp-extension

Magento 2 SMTP Extension – User Guide

Extension context

This document provides a comprehensive guide for the Toweringmedia SMTP Extension for Magento 2. It is intended for store administrators and developers who want to configure and manage email delivery through SMTP instead of Magento’s default mail system.

Overview

The Toweringmedia SMTP Extension for Magento 2 offers a secure, reliable, and fully configurable email delivery solution. It replaces Magento’s default mail transport system with a robust SMTP-based system designed for enterprise-grade performance.

This extension ensures that all transactional emails—such as order confirmations, invoices, shipments, and customer communications—are delivered efficiently and consistently.

It supports a wide range of email service providers including Gmail, Google Workspace (G Suite), Outlook 365, Zoho Mail, Amazon SES, SendGrid, Mailgun, as well as any custom SMTP server.

The extension is built with modern security standards in mind and supports advanced authentication mechanisms such as OAuth, ensuring compliance with current email provider requirements.

Key features

  • Improved email deliverability and reduced spam issues
  • Reliable transactional email flow
  • Seamless integration with major email service providers
  • Detailed email logging and debugging support
  • Support for secure authentication methods (OAuth, TLS, SSL)
  • Easy configuration from Magento Admin panel

What this extension does

  • Enhances inbox delivery rates by using trusted SMTP servers
  • Ensures reliable sending of order and customer notification emails
  • Allows direct integration with third-party email providers
  • Provides logging for tracking sent emails and troubleshooting issues
  • Supports modern security protocols to meet compliance standards

Installation

Please refer to the installation guide in the following article https://toweringmedia.com/installation

Setup SMTP extension with Gmail API

This section provides a step-by-step guide to configure the Magento 2 SMTP Extension using Gmail API with OAuth 2.0 authentication.

Step 1: Create a project in Google Cloud Console

  1. Log in to your Google Cloud Console
  2. Click on the project selector and choose New Project
  3. Enter a project name (e.g., SMTP Connector for Magento)
  4. Click Create
  5. Select the created project from the top navigation

Step 2: Enable Gmail API

  1. Open the navigation menu
  2. Go to APIs & Services → Enabled APIs & Services

  1. Click Enable APIs and Services
  2. Search for Gmail API
  3. Select and click Enable

  1. Navigate to APIs & Services → Credentials

  1. Click Configure Consent Screen
  2. Click Get Started

  1. Enter application name (e.g., SMTP)
  2. Provide support email
  3. Choose Internal as audience
  4. Save configuration

Step 4: Create OAuth client credentials

  1. Go to Credentials
  2. Click Create Credentials → OAuth Client ID

  1. Select Web Application
  2. Enter a name (e.g., SMTP)

  1. Add Authorized Redirect URI from Magento SMTP settings

  1. Click Create
  2. Copy Client ID and Client Secret

Step 5: Configure API scopes

  1. Navigate to Data Access
  2. Click Add or Remove Scopes

  1. Set rows to 100
  2. Select required scopes

  1. Click Update
  2. Click Save

Step 6: Configure SMTP settings in Magento Admin

  1. Log in to Magento Admin
  2. Navigate to SMTP settings
  3. Set SMTP Provider to Gmail
  4. Enter Gmail email address
  5. Set Authentication Method to OAuth 2.0
  6. Enter Client ID and Client Secret
  7. Save configuration and flush cache

Step 7: Authorize Gmail account

  1. Scroll to SMTP configuration section
  2. Click Authorize with Google
  3. Complete authentication in popup
  4. Verify status shows:
    • OAuth is configured and authorized
    • Authorization Status: Authorized

Step 8: Verify email functionality

  1. Enter test email address
  2. Send test email
  3. Verify email delivery

If the email is received, SMTP configuration is successfully completed.

Validation checklist

  • Configuration saves without errors in Admin.
  • Expected storefront/admin behavior is present.
  • No critical PHP/JS errors occur during test flow.
  • Caches and static assets are refreshed after changes.

Troubleshooting

  • Feature missing: verify module status, cache flush, and static-content deploy.
  • Unexpected behavior: retest with only required related modules enabled.
  • Admin setting not applying: verify config scope and clear cache.
magento2/extensions/magento-2-smtp-extension.txt · Last modified: by swatwik