sohaibilyas / laravel-zeptomail
A ZeptoMail mail transport for Laravel.
v1.0.1
2026-07-04 13:06 UTC
Requires
- php: ^8.2
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/mail: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- symfony/mailer: ^7.0|^8.0
- symfony/mime: ^7.0|^8.0
Requires (Dev)
- laravel/pint: ^1.22
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.8|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
- phpstan/phpstan: ^2.1
README
A Laravel mail transport for sending mail through Zoho ZeptoMail.
Installation
composer require sohaibilyas/laravel-zeptomail
Configuration
Add your ZeptoMail token to .env:
ZEPTOMAIL_TOKEN="Zoho-enczapikey your-token" ZEPTOMAIL_HOST=api.zeptomail.com ZEPTOMAIL_API_VERSION=v1.1
You may also pass only the raw token value. The transport will add the Zoho-enczapikey prefix automatically.
The package automatically registers a zeptomail Laravel mailer. Set it as your default mailer:
MAIL_MAILER=zeptomail MAIL_FROM_ADDRESS=noreply@example.com MAIL_FROM_NAME="${APP_NAME}"
Publishing the config file is optional. Use it only when you want the ZeptoMail package config in your app:
php artisan vendor:publish --tag=zeptomail-config
If you prefer to configure ZeptoMail inside Laravel's mail config instead, you may add a zeptomail entry to config/mail.php:
'mailers' => [ 'zeptomail' => [ 'transport' => 'zeptomail', 'token' => env('ZEPTOMAIL_TOKEN'), 'host' => env('ZEPTOMAIL_HOST', 'api.zeptomail.com'), 'version' => env('ZEPTOMAIL_API_VERSION', 'v1.1'), 'timeout' => env('ZEPTOMAIL_TIMEOUT', 30), ], ],
Usage
Use Laravel's mail API as usual:
use App\Mail\WelcomeMail; use Illuminate\Support\Facades\Mail; Mail::to('info@example.com')->send(new WelcomeMail);
The transport sends requests to:
https://api.zeptomail.com/v1.1/email
Testing
composer test