Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/yugo412/laravel-maily/llms.txt

Use this file to discover all available pages before exploring further.

Laravel Maily is a custom mail transport driver that lets your Laravel application send email through the Maily.id API without any SMTP configuration. Install it once, set two environment variables, and your existing Mail::send, Mail::queue, and Notification calls work as-is.

Installation

Add the package via Composer and register it in under two minutes.

Configuration

Set your API key, endpoint, and retry options in one config block.

Sending Email

Use raw text, Mailables, or queued mail — exactly as you do today.

Events & Hooks

Listen to MailySentEvent to log delivery data and track API responses.

Why Laravel Maily?

Maily.id is an API-only email service with no SMTP endpoint. Without this package, using it from Laravel would require rewriting every send call. Laravel Maily bridges that gap by implementing Symfony Mailer’s AbstractTransport interface, so the rest of your application never needs to change.
1

Install the package

Run composer require yugo/laravel-maily. Laravel’s auto-discovery registers the service provider automatically.
2

Add your API key

Set MAIL_MAILER=maily and MAILY_KEY=ml_live_... in your .env file.
3

Configure services.php

Add a maily block to config/services.php pointing at your key and endpoint.
4

Send mail normally

Call Mail::to($user)->send(new WelcomeMail()) — Laravel Maily handles the rest.

Key features

Native integration

Implements Symfony Mailer’s transport interface — no changes to existing code.

Queue compatible

Works transparently with Laravel queues and scheduled jobs.

Retry support

Configurable retry count and delay for transient connection failures.

Event dispatching

Fires MailySentEvent after every successful delivery for logging and analytics.

Build docs developers (and LLMs) love