Mageplaza Magento 2 SMTP

repository·2.4·Indexed 43 days ago

https://github.com/mageplaza/magento-2-smtp

An extension for Magento 2 that replaces default webserver mail delivery with a custom SMTP server to improve email deliverability. Features include support for providers like Gmail and Outlook, configurable connection details (Host, Port, Protocol), email logs for debugging, and a Developer Mode to simulate sending without delivering emails to receivers.

Tokens
1K
Snippets
2
Records
8
Agent score
5%

What's inside Mageplaza SMTP

  1. Install Mageplaza SMTP Extension via Composer

    2.4

    To install the SMTP extension in your Magento 2 environment, run the following commands from your Magento 2 root directory. It is recommended to use Composer for installation.

    composer require mageplaza/module-smtp
    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy
  2. Install Magento 2 SMTP via Composer

    2.4

    The recommended way to install the SMTP extension is using Composer. Run these commands from your Magento 2 root directory to require the package and update your Magento installation.

    composer require mageplaza/module-smtp
    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy
  3. Manage Email Logs and Debugging

    2.4

    The extension provides tools to monitor and debug sent emails via Mageplaza > SMTP > Email Logs.

    Viewing Logs

    • Review the content, recipient, timestamp, and status (pending, in process, or failed) of sent emails.
    • Click View on an individual email to see exactly what the customer receives in their email client.
    • Use the Clear button to manually delete all archived emails.

    Debug Mode

    Enable Developer Mode (set to Yes) to prevent Magento from actually delivering emails to receivers. This is useful for testing email content and logic without sending real emails to customers.

    Log Retention

    Under the Schedule Log Cleaner section, you can configure the Clean Email Log Every field. This defines how many days an email log is kept before being automatically deleted. Leave this field blank to keep logs indefinitely.

  4. Configure SMTP Provider and Connection Options

    2.4

    Navigate to Mageplaza > SMTP > Configuration > General Configuration in the Magento admin panel to set up your email delivery settings.

    SMTP Provider

    Select your provider from the list (e.g., Gmail, Outlook, Send In Blue, etc.). Using the Auto Fill button will automatically populate the Host, Port, Authentication, and Protocol fields with compatible settings. You can also select a Custom SMTP provider to enter details manually.

    Connection Details

    • Host: The SMTP server hostname or IP address.
    • Port: The specific gate for email transmission. Common ports include:
      • 25: Standard protocol (non-SSL).
      • 465: SSL protocol.
      • 578: TLS protocol.
    • Authentication: The method used to verify your account. Common methods include:
      • Login: Uses a Username and Password (most common).
      • Plain
      • CRAM-MD5
    • Account: Your SMTP username/account name.
    • Password: Your SMTP password (will be encrypted in the admin panel).
    • Protocol: The security layer used:
      • None: No encryption (use with caution).
      • SSL: Secure Socket Layer.
      • TLS: Transport Layer Security.
    • Return-path email: An optional field to specify the return path; leave empty to ignore.
  5. Configure Developer and Logging Modes

    2.4

    In the SMTP configuration, you can control how logs are handled and how emails are delivered for development purposes:

    • Log Email:
      • Yes: Sent emails are saved to the Email Logs for review and scheduled cleanup.
      • No: Sent emails are not archived.
    • Developer Mode:
      • Yes: Magento will not deliver any email to the receiver (simulated sending).
      • No: Magento will deliver emails to the receiver as normal.
  6. Troubleshoot 'Mageplaza_Core has been already defined' error

    2.4
    If you encounter the error Mageplaza_Core has been already defined, it indicates a conflict with the Mageplaza Core module. You can find the specific solution in the Mageplaza Core GitHub issues repository.
  7. Test SMTP Settings with Test Email

    2.4

    Before sending official emails, you can verify your configuration using the Test email recipient field in the SMTP Configuration Options.

    1. Enter a valid email address in the Test email recipient field.
    2. Click the Test Now button.
    3. If the configuration is correct, a successful notification will be sent to the provided email address.