Skip to main content

Installation

Get started with Lettermint Laravel by installing the package via Composer and publishing the configuration file.

Requirements

Before installing, ensure your environment meets these requirements:
  • PHP: 8.2 or higher
  • Laravel: 9 or higher

Installation steps

1

Install via Composer

Install the Lettermint Laravel package using Composer:
composer require lettermint/lettermint-laravel
The package uses Laravel’s auto-discovery feature, so the service provider will be registered automatically.
2

Publish the configuration file

Publish the configuration file to customize your Lettermint settings:
php artisan vendor:publish --tag="lettermint-config"
This creates a config/lettermint.php file in your application where you can configure your API token and webhook settings.
3

Configure your API token

Add your Lettermint API token to your .env file:
LETTERMINT_TOKEN=your-lettermint-token
You can find your API token in your Lettermint project settings.
4

Configure the mail transport

Update your config/mail.php to add the Lettermint mailer. See the Configuration guide for detailed setup instructions.

Verify installation

After installation, verify that the package is installed correctly:

Check the configuration file

Verify that the configuration file exists at config/lettermint.php:
ls config/lettermint.php

Check the service provider

The LettermintServiceProvider should be automatically registered. You can verify this by running:
php artisan about
Look for the Lettermint package in the list of loaded service providers.

What’s next?

After installing the package, you need to configure it to start sending emails:

Configuration guide

Learn how to configure API tokens, mail transports, routes, and advanced features like idempotency

Updating the package

To update to the latest version of Lettermint Laravel:
composer update lettermint/lettermint-laravel
Always check the changelog for breaking changes before updating.

Build docs developers (and LLMs) love