Using Swiftmail to send email in Laravel

  1. Configs must be in .env. Not working in /config/mail.php (Unknown reason)

2. Add ‘stream’ config in config/mail.php, or you won’t be able to send emails on local machine.

3. Debug: /vendor/laravel/framework/src/illuminate/Mail/TransportManager.php

4. Clear config cache. (Optional)

Mail Example


Controller to send email



  2. Add custom subject: