mailvoidr/laravel
Composer 安装命令:
composer require mailvoidr/laravel
包简介
Official Laravel SDK for the Mailvoidr transactional email API
README 文档
README
Official Laravel client for the Mailvoidr transactional email API.
Use this when SMTP port 587 is unavailable — the HTTP API delivers the same way.
Install
composer require mailvoidr/laravel
Configure
Only your API key is required. Base URL, default sender (hello@mailvoidr.com), and timeout are built in.
MAIL_MAILER=mailvoidr MAILVOIDR_API_KEY=mvdr_live_your_key_here
Add a mailer in config/mail.php:
'mailvoidr' => [ 'transport' => 'mailvoidr', ],
That's it — Mail::, Mailables, and Notifications all route through Mailvoidr.
Laravel Mail (recommended)
use Illuminate\Support\Facades\Mail; use App\Mail\WelcomeMail; Mail::to('riya@example.com')->send(new WelcomeMail());
// Notification $user->notify(new OrderShipped($order));
Default sender is hello@mailvoidr.com. Override per mailable:
return $this->from('hello@mail.yourdomain.com', 'Acme') ->subject('Welcome') ->view('emails.welcome');
Direct API client
use Mailvoidr\Laravel\Facades\Mailvoidr; $response = Mailvoidr::send([ 'to' => ['riya@example.com'], 'subject' => 'Welcome to Acme', 'html' => '<h1>Hey Riya</h1>', ]); $send = Mailvoidr::getSend($response->id);
Inject the client:
use Mailvoidr\Laravel\Client\MailvoidrClient; public function __construct(private MailvoidrClient $mailvoidr) {}
Errors
MailvoidrException is thrown on 402 (plan limit), 403 (live sending off), 422 (validation), and other non-success responses. The mail transport wraps these as TransportException.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-29