xiaohuilam / laravel-submail
v0.3
2018-11-05 08:42 UTC
Requires
- php: >=5.5.0
- illuminate/support: 5.*
This package is auto-updated.
Last update: 2024-12-06 10:10:01 UTC
README
composer require bingooo/laravel-submail
config/app.php
'providers' => [ Bingooo\Mail\SubMailServiceProvider::class, ];
.env
MAIL_DRIVER=submail SUBMAIL_APPID= SUBMAIL_APPKEY=
Normal
Mail::send('emails.welcome', $data, function ($message) { $message->from('foo@example.com', 'XXXXX'); $message->to('foo@example.com')->cc('bar@example.com'); });
Use template:
$vars = ['name' => 'hi','link_text' => 'http://example.com']; $links = ['link' => 'http://example.com']; $template = new Bingooo\Mail\SubMailTemplate('XXXXX', $vars, $links); \Mail::raw($template,function($message){ $message->from('foo@example.com', 'XXXXX'); $message->to('foo@example.com'); });