29.07.2016 Views

laravel-5

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Mail 297<br />

Log Driver<br />

One solution is to use the log mail driver during local development. This driver will write all e-mail<br />

messages to your log files for inspection. For more information on configuring your application per<br />

environment, check out the configuration documentation.<br />

Universal To<br />

Another solution provided by Laravel is to set a universal recipient of all e-mails sent by the<br />

framework. This way, all the emails generated by your application will be sent to a specific address,<br />

instead of the address actually specified when sending the message. This can be done via the to<br />

option in your config/mail.php configuration file:<br />

.<br />

1 'to' => [<br />

2 'address' => 'dev@domain.com',<br />

3 'name' => 'Dev Example'<br />

4 ],<br />

Mailtrap<br />

Finally, you may use a service like Mailtrap¹⁵⁶ and the smtp driver to send your e-mail messages to a<br />

“dummy” mailbox where you may view them in a true e-mail client. This approach has the benefit<br />

of allowing you to actually inspect the final e-mails in Mailtrap’s message viewer.<br />

¹⁵⁶https://mailtrap.io

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!