Before using the outbound system, you must enable outbound for either "quarantine users and account contacts" or "smart host relay," in the Outbound > Outbound Settings tab:
And setting the appropriate values for these 4:
MAIL_USERNAME=YOUR_DOMAIN_NAME.com
MAIL_PASSWORD="Your_Smart_Host_Password (quoted)"
MAIL_FROM_ADDRESS=default_from_address@your-domain.com
MAIL_FROM_NAME=default_from_name
If you don't have "outbound smart host relay" enabled in your SpamHero outbound settings, and just have outbound enabled for individual quarantine users and account contacts, you can alternatively set the credentials above from one of these users instead.
And that's it! You can then send emails as outlined in Laravel's official documentation:
Mail::to(["someone@example.com"])->locale("en")->send(new Notification("some Parameters"));
If you have made any changes to config/mail.php
, you'll want to revert them for this to work. You can grab a copy from Laravel's official github.