Design Emails and Send Them Via API with MailCarrier
Published on by Paul Redmond
MailCarrier is an open-source web app built with Laravel and Filament, where you can design emails once and send them via an API call. If you've ever used Twig, you will feel right at home with the email template syntax:
<p>Hello, {{ name|capitalize }}!</p><p>Here's your recap:</p> <ul>{% for item in items %} <li> <a href="{{ item.href }}">{{ item.caption }}</a> </li>{% endfor %}</ul>
MailCarrier has a lot of helpful features out of the box for sending emails, including the following:
- Expressive template syntax using Symfony's Twig PHP template engine
- Multiple providers like SES, MailGun, SendGrid, etc.
- Send emails via API calls
- Secured using Laravel Sanctum
- Upload attachments or retrieve them from S3
- Send emails synchronously or async via queues
- Run via a self-contained Docker instance, or however you'd like
- Easily extensible using familiar tools like Laravel, Livewire
To get started with this app, check out the extensive MailCarrier documentation. You can also view the source code on GitHub to contribute or install in your Laravel app.
If you want to install this in an existing Laravel application, you can do so with composer:
composer require mailcarrier/mailcarrier
If you want to start a new app using MailCarrier, they provide a one-liner installation script:
curl "https://mailcarrier.app/create" | bash