Simple setup & reliable delivery
Add transactional email to your Laravel app in minutes using Sidemail's official PHP SDK. Send welcome emails, password resets, receipts, and notifications through a clean API while Sidemail takes care of deliverability, authentication, and infrastructure.
Get startedRead API docsuse Sidemail\Sidemail;
class RegistrationController extends Controller
{
public function store(Request $request, Sidemail $sidemail)
{
// ... create user ...
$sidemail->sendEmail([
'toAddress' => $user->email,
'fromAddress' => '[email protected]',
'fromName' => 'Your App',
'templateName' => 'Welcome',
'templateProps' => ['firstName' => $user->name],
]);
return response('User registered!');
}
}Start sending emails from your Laravel app in three steps:
Add Sidemail to your Laravel project via Composer:
composer require sidemail/sidemailAdd your API key to .env and register the Sidemail client as a singleton in AppServiceProvider. The SDK reads SIDEMAIL_API_KEY from your environment automatically.
// app/Providers/AppServiceProvider.php
use Sidemail\Sidemail;
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
$this->app->singleton(Sidemail::class, function () {
return new Sidemail();
});
}
}Inject Sidemail\Sidemail into your controller method and call sendEmail. Pass the recipient, sender, and template or content. That's it – your Laravel app sends the email through Sidemail's API.
use Sidemail\Sidemail;
class RegistrationController extends Controller
{
public function store(Request $request, Sidemail $sidemail)
{
// ... create user ...
$sidemail->sendEmail([
'toAddress' => $user->email,
'fromAddress' => '[email protected]',
'fromName' => 'Your App',
'templateName' => 'Welcome',
'templateProps' => ['firstName' => $user->name],
]);
return response('User registered!');
}
}Key features & perks
Sidemail makes it easy to send any transactional email from Laravel. Here are a few common examples with code:
// Laravel: Send an account verification email
use Sidemail\Sidemail;
public function store(Request $request, Sidemail $sidemail)
{
// ... create user, generate token ...
$sidemail->sendEmail([
'toAddress' => $user->email,
'fromAddress' => '[email protected]',
'fromName' => 'Your App',
'templateName' => 'Email Verification',
'templateProps' => [
'verifyUrl' => 'https://yourapp.com/verify?token=' . $token,
],
]);
return response('User registered!');
}Send a sign-up verification email with a one-time link or code to confirm the user's address.
// Laravel: Send a payment receipt email
use Sidemail\Sidemail;
public function sendReceipt(Request $request, Sidemail $sidemail)
{
$sidemail->sendEmail([
'toAddress' => $user->email,
'fromAddress' => '[email protected]',
'fromName' => 'Your App',
'templateName' => 'Payment Receipt',
'templateProps' => [
'userName' => $user->name,
'amount' => '$19.99',
'date' => now()->toFormattedDateString(),
],
]);
return response('Receipt sent!');
}Send a receipt, invoice, or generic notification to your user.
templateProps to populate the template.// Laravel: Schedule a welcome email for 1 hour from now
$sidemail->sendEmail([
'toAddress' => '[email protected]',
'fromAddress' => '[email protected]',
'fromName' => 'Your App',
'templateName' => 'Welcome',
'templateProps' => ['firstName' => 'Alex'],
'scheduledAt' => now()->addHour()->toIso8601String(),
]);Schedule a welcome email to be sent later, for example one hour after sign-up.
scheduledAt field with an ISO timestamp to control exactly when the email is sent.// Laravel: Send a password reset email with Markdown
$markdown = file_get_contents(
resource_path('views/emails/password-reset.md')
);
$sidemail->sendEmail([
'toAddress' => '[email protected]',
'markdown' => $markdown,
'templateProps' => [
'firstName' => 'Alex',
'resetLink' => 'https://yourapp.com/reset?token=abc123xyz',
'expiresIn' => '30 minutes',
],
]);---
subject: "Reset your password"
fromAddress: "[email protected]"
fromName: "Your App Security"
---
Hi {firstName}, we received a request to reset your password.
[$btn Reset password]({resetLink})
This link expires in {expiresIn}.Sidemail's API gives you an option to write email content in Markdown, which is automatically transformed into pixel‑perfect, responsive emails that look great in every inbox and on every device. Each email is branded with your logo and styled to match your project's email design.
.md filetemplateProps(such as resetLink and expiresIn), which map directly to variables in your markdown.Deliverability best practices
SPF and DKIM are authentication protocols that verify your emails are legitimately sent from your domain. And DMARC builds on both by instructing mail servers how to handle messages that fail those checks. Together, they are 3 critical factors for inbox delivery and sender reputation.
Sidemail automatically handles SPF, DKIM, and DMARC setup for you, so your Laravel app sends authenticated, compliant emails from day one.




The simplest way to build emails
Sidemail's visual email editor is the fastest way to create responsive templates that render correctly in every email client and on every device. No HTML knowledge needed. Add your logo and brand colors, and start sending right away.
Want to move even faster? Choose from a library of production‑ready templates for common use cases like password resets, welcome emails, and receipts. Whether you build from scratch or customize an existing template, your emails will look polished everywhere.
Learn moreDeveloper‑friendly formatting
Building and maintaining HTML emails by hand is painful, especially when all you want is clean, readable content.
With Sidemail, you write your email body in Markdown and it gets automatically converted into a responsive, well‑styled HTML email. Smart formatting like headings, lists, links, and code blocks works out of the box, with no broken layouts or cross‑client rendering issues.
Perfect for transactional emails sent from your Laravel app. Clean content, fast authoring, zero HTML to debug.
Learn more
Ready to send transactional emails from your Laravel app? With Sidemail's API and premade templates, you can integrate in minutes and deliver emails reliably.
Start free trialThe easiest way to send email in Laravel is by using an email API like Sidemail. Install the PHP SDK (composer require sidemail/sidemail), register the client as a singleton in your AppServiceProvider, and inject it into any controller method. Then call $sidemail->sendEmail() with your email payload. No SMTP configuration, no Mailable classes – just a clean API call. Sidemail handles authentication, formatting, and deliverability for you.
Yes. Sidemail replaces the need for Laravel's Mailable classes, Mail facade, and SMTP drivers. Instead of building Mailable objects and configuring mail drivers, you call a single sendEmail() method with your data. This approach is simpler, gives you managed deliverability (DKIM, SPF, DMARC), premade templates, and a dashboard for monitoring – without any of the boilerplate.
Instead of building Blade email views, use Sidemail's template system. In the Sidemail dashboard, pick a premade template or create your own with the drag‑and‑drop editor. Then in your Laravel controller, reference the template by templateName and pass personalization data via templateProps. For example, a "Welcome" template with a {firstName} variable can be sent by calling $sidemail->sendEmail() with the matching prop. Sidemail merges the data and delivers a well‑formatted email.
Absolutely. Since the Sidemail client is registered as a singleton in the service container, you can resolve it anywhere – controllers, Artisan console commands, queued jobs, event listeners, or scheduled tasks. This makes it straightforward to send emails from background processes like weekly report commands or async job workers.
Yes. Add the scheduledAt field with a future ISO 8601 timestamp to your sendEmail() call. In Laravel, you can use now()->addHour()->toIso8601String() to generate it. Sidemail queues the message and delivers it at the specified time. You can view or cancel scheduled emails from the dashboard or via the API.
Wrap your $sidemail->sendEmail() call in a try/catch block and catch Sidemail\SidemailException. The exception includes the HTTP status, error code, and message, making it easy to log with Laravel's Log::error() or report to your error tracking service.