Laravel also includes drivers for the Mailgun and Mandrill HTTP interfaces. These APIs are often simpler and faster than SMTP servers. Both of these drivers require the Guzzle 5 HTTP library to be installed in your application. You can add Guzzle 5 to your project by adding the following line to your composer.json file:
"guzzlehttp/guzzle": "~5.0" composer update
Mailgun driver
To use the Mailgun driver, set the driver option for mail in the config / mail.php configuration file. Then create the config / services.php configuration file if it does not already exist for your project. Make sure it contains the following options:
'mailgun' => [ 'domain' => 'your-mailgun-domain', 'secret' => 'your-mailgun-key', ],
Mandrill Driver
To use the Mandrill driver, set the mandrill driver parameter in the config / mail.php configuration file. Then create the config / services.php configuration file if it does not already exist for your project. Make sure it contains the following options:
'mandrill' => [ 'secret' => 'your-mandrill-key', ],
Main use
The Mail::send method may be used to send an e-mail message: Mail::send('emails.welcome', ['key' => 'value'], function($message) { $message->to(' foo@example.com ', 'John Smith')->subject('Welcome!'); });
http://laravel.com/docs/5.0/mail
source share