Magento 2
1. Installation
Install the package via Composer:
Code
After installation, run the Magento setup commands:
Code
2. Configuration
Make sure you have your API token ready, which you can find in your project settings.
Finding the Settings
Navigate to Stores → Settings → Configuration. Then look for Lettermint in the sidebar.

General Settings
- Set Enable Lettermint Email to Yes
- Enter your project's API token in the API Token field
- Save the configuration
Route Configuration (Optional)
Configure which routes handle different email types:
- Transactional Email Route: Used for system emails (password resets, order confirmations, invoices, track & trace updates)
- Newsletter/Marketing Route: Used for newsletter emails sent via Marketing → Newsletter Queue
The defaults work for most setups. Only configure custom routes if you need to separate email traffic for analytics or deliverability purposes.
3. Sending Emails
Automatic Transactional Emails
Once configured, all Magento transactional emails automatically route through Lettermint:
- Order confirmations
- Shipping notifications
- Password reset emails
- Customer account emails
- Invoice and credit memo emails
No code changes required - just configure and you're ready.
Testing Your Setup
Verify the integration works by triggering a test email:
- Go to Marketing → Communications → Email Templates
- Create or edit a template
- Click Preview Template and send a test email
Or trigger a password reset from the customer login page to test transactional emails.
Programmatic Emails
Send emails programmatically using Magento's transport builder:
Code
Adding Custom Headers
Add Lettermint headers for metadata and tags using a plugin:
Code
Register the plugin in etc/di.xml:
Code
Metadata is included in webhook payloads but not added to the actual email headers. Use it for tracking and analytics purposes.
4. Troubleshooting
Emails Not Sending
- Verify Enable Lettermint Email is set to Yes
- Check your API token is correct
- Review logs in
var/log/system.log - Ensure the module is enabled:
bin/magento module:status Lettermint_Email
Clear Cache After Changes
After configuration changes:
Code
Next Steps
Tags
Organize and filter emails with tags.
Tracking
Track opens, clicks, and deliverability.
Webhooks
Receive real-time delivery notifications.
SMTP Alternative
Send via SMTP instead of the API.
GitHub Repository
Find the complete source code, report issues, or contribute on GitHub.