Skip to main content
Send transactional emails from your Laravel application using the official Lettr SDK. Get up and running in under a minute with our interactive setup command. The lettr/lettr-laravel package provides a first-class Laravel integration that plugs directly into Laravel’s mail system. Once installed, you can send emails through Lettr using the same Mail facade, Mailable classes, and notification channels you already know — no new abstractions to learn. Using Cursor? Jump straight in using this prompt

Why Use the Laravel SDK?

Rather than making raw API calls, the SDK gives you:
  • Native mail transport — Lettr registers as a Laravel mailer, so Mail::to()->send() works out of the box
  • Template support — Send Lettr-managed templates with merge tags directly from your application
  • Code generation — Auto-generate enums, DTOs, and Mailable classes from your Lettr templates for compile-time safety
  • Zero lock-in — Your Mailables remain standard Laravel classes. Switching away from Lettr only requires changing the mailer config
If you prefer not to use the SDK, you can also send emails via SMTP or the REST API directly.

Prerequisites

Before you begin, make sure you have: You’ll also need:
  • PHP 8.4+ and Composer installed
  • A Laravel 10.x, 11.x, or 12.x application
  • A MAIL_FROM_ADDRESS that uses your verified sending domain

Quick Setup

The fastest way to get started is using our interactive init command. It configures everything automatically.
1

Install the package

composer require lettr/lettr-laravel
2

Run the init command

php artisan lettr:init
3

Send your first email

use App\Mail\WelcomeEmail;
use Illuminate\Support\Facades\Mail;

Mail::to('user@example.com')->send(new WelcomeEmail());
Works with any Laravel Mailable - no code changes needed.
If you already have Mailables in your application, they’ll automatically route through Lettr once you set it as your default mailer. No refactoring required.

The Init Command

The lettr:init command provides a guided setup experience that handles everything:
lettr:init command demo
What it does:
  • Prompts for your API key and saves it to .env
  • Publishes the configuration file
  • Adds the Lettr mailer to config/mail.php
  • Optionally sets Lettr as your default mailer
  • Generates type-safe template enums and DTOs
  • Configures your sending domain
No more manual config file editing or copy-pasting boilerplate.
Prefer manual control? The Installation page walks through each step individually so you can configure exactly what you need.

Section Overview

This quickstart is organized into four pages that build on each other:
PageWhat You’ll Learn
InstallationManual setup, configuration options, and verifying your installation
Sending EmailsAll the ways to send emails — Mail facade, Lettr facade, builder, Mailables, attachments, and testing
TemplatesWorking with Lettr-managed templates, versioning, projects, and pulling/pushing templates locally
Type SafetyGenerating enums, DTOs, and Mailable classes for compile-time safety

What’s Next