bingooo / laravel-submail
dev-master
2016-03-02 06:44 UTC
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ^6.1
- illuminate/support: 5.1.*
This package is auto-updated.
Last update: 2024-11-12 19:44:08 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'); });