Integrate Lettermint email service with your Magento 2 store for reliable transactional and marketing email delivery.
- Magento Open Source or Adobe Commerce 2.4.6 or higher
- PHP 8.2 or higher
- Composer
The module sends email with the Lettermint PHP SDK 3.x, which needs Guzzle 7.15.2 or higher. Composer installs it for you.
Install the module via Composer:
composer require lettermint/lettermint-magento2
php bin/magento module:enable Lettermint_Email
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flushThis version uses lettermint/lettermint-php 3.x instead of 1.x. If your store has an older Guzzle locked, let Composer update the dependencies too:
composer update lettermint/lettermint-magento2 --with-all-dependencies
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flushYour configuration is kept: the admin settings and their config paths are unchanged.
- Navigate to Stores → Configuration → Lettermint → Configuration
- Enable the module
- Enter your Lettermint project sending token
- Configure sender information and route IDs
- Save configuration
- API Token: Your Lettermint project sending token, starting with
lm_(encrypted storage). Team API tokens cannot send email. - Transactional Route: Route ID for transactional emails (default:
outgoing) - Newsletter Route: Route ID for newsletter/marketing emails (default:
broadcast) - Sender Configuration: Default sender name and email address
- Transactional Emails: Order confirmations, password resets, etc. → Configurable route (default:
outgoing) - Newsletter Emails: Marketing campaigns, newsletters → Configurable route (default:
broadcast)
When the module is enabled, a plugin on Magento's transport factory gives every email its own Lettermint transport. The transport sends the email through the Lettermint API in one request. Emails sent from the Magento Newsletter module use the newsletter route; all other emails use the transactional route.
Magento email → TransportSwitcher plugin → Lettermint transport → Lettermint API (route)
If Lettermint rejects an email or cannot be reached within 15 seconds, the error is logged to Magento's log and Magento receives a MailException. The module does not retry.
- API tokens are encrypted in Magento's configuration storage
- Input validation and sanitization
- Secure API communication via HTTPS
- API tokens are never logged
The unit tests install magento/framework from the public Mage-OS mirror, so no Magento Marketplace credentials are needed. They never call the Lettermint API.
composer update --ignore-platform-req='ext-*'
composer lint # php -l on every PHP file
composer test # PHPUnit
composer analyse # PHPStanTo test against a specific Magento line, constrain the framework version, for example composer update --ignore-platform-req='ext-*' --with 'magento/framework:103.0.6.*' for Magento 2.4.6. CI runs Magento 2.4.6 to 2.4.9 on PHP 8.2 to 8.5.
The MIT License (MIT). Please see License File for more information.