vikramsra / laravel-zeptomail
Zoho ZeptoMail mail transport for Laravel
v1.1.0
2026-10-14 07:24 UTC
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- illuminate/mail: ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0
- symfony/mailer: ^6.0 || ^7.0 || ^8.0
- symfony/mime: ^6.0 || ^7.0 || ^8.0
Requires (Dev)
- orchestra/testbench: ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
- phpunit/phpunit: ^9.5 || ^10.0 || ^11.0 || ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A Zoho ZeptoMail mail transport for Laravel.
Based on the original ZeptoMail Laravel driver by Zoho Mail.
Requirements
- PHP 8.0 or later
- Laravel 9, 10, 11, 12 or 13
- A ZeptoMail account with a verified sending domain
Installation
composer require vikramsra/laravel-zeptomail
The service provider is registered automatically through package discovery, and it registers the zeptomail transport for you.
Configuration
Add a mailer to the mailers array in config/mail.php:
'zeptomail' => [ 'transport' => 'zeptomail', ],
Then set these values in your .env file:
MAIL_MAILER=zeptomail ZEPTOMAIL_TOKEN="your-send-mail-token" ZEPTOMAIL_HOST=api.zeptomail.com MAIL_FROM_ADDRESS=invoice@zylker.com MAIL_FROM_NAME="App Name"
| Variable | Description |
|---|---|
ZEPTOMAIL_TOKEN |
The Send Mail token from your ZeptoMail Mail Agent (Mail Agents → SMTP/API → API). You can paste it with or without the Zoho-enczapikey prefix. |
ZEPTOMAIL_HOST |
The ZeptoMail API hostname for your account, e.g. api.zeptomail.com or api.zeptomail.eu (shown on your Mail Agent's setup page). For backwards compatibility you can also give a Zoho data centre, zoho.com (default), zoho.eu, zoho.in, zoho.com.cn, zoho.com.au, zoho.jp, zohocloud.ca or zoho.sa, which sends to zeptomail.<data centre>. |
ZEPTOMAIL_TIMEOUT |
How many seconds to wait for the ZeptoMail API before giving up. Default: 30. |
You can also set api_key, host and timeout on the mailer entry in config/mail.php. Those values override the package config. This is useful if you send from more than one Mail Agent.
To publish the config file:
php artisan vendor:publish --tag=zeptomail-config
Features
- To, CC, BCC and Reply-To recipients
- HTML and plain-text bodies
- Attachments, plus inline images added with
$message->embed() - Custom headers, sent as ZeptoMail
mime_headers - ZeptoMail's
request_idis used as the sent message's ID - Errors throw Symfony's
TransportException, so the transport works with Laravel'sfailoverandroundrobinmailers
Sending a test email
php artisan tinker
Mail::raw('This is a test email', fn ($message) => $message->to('test@example.com')->subject('Testing Laravel'));
Testing
composer install
composer test
License
MIT