Basic email sending
Once you’ve configured the Lettermint transport, you can send emails using Laravel’s standard Mail methods:Sending to multiple recipients
You can send emails to multiple recipients using Laravel’sto(), cc(), and bcc() methods:
Email content
The driver supports both HTML and plain text email content:Using Laravel Mailables
Create a Mailable class to organize your email logic:Custom headers
You can add custom headers to your emails:The Lettermint driver automatically handles all standard email headers including
From, To, CC, BCC, Subject, Reply-To, and Content-Type.Reply-To addresses
Specify a reply-to address for your emails:Queued emails
Send emails asynchronously using Laravel’s queue system:When using queued emails, consider enabling idempotency to prevent duplicate sends if jobs are retried.
Error handling
The driver throws aTransportException if the API request fails:
Message ID tracking
After sending an email, Lettermint returns a message ID that’s automatically set on the email. This ID can be used to track the email’s delivery status:The message ID is formatted to comply with RFC 5322 standards. If Lettermint’s ID doesn’t contain an
@ symbol, the driver automatically appends @lmta.net.