Send email from Laravel over SMTP
Laravel reads SMTP settings from your `.env`. Point the mailer at Unitpost and send from a verified domain.
Set your mail environment variables
Add the following to your
.envfile.ShellMAIL_MAILER=smtp MAIL_HOST=smtp.unitpost.com MAIL_PORT=587 MAIL_USERNAME=unitpost MAIL_PASSWORD=${UNITPOST_API_KEY} MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=you@yourdomain.com MAIL_FROM_NAME="${APP_NAME}"MAIL_FROM_ADDRESS must be on a domain you've verified in Unitpost.
Clear the config cache
If you cache config in production, refresh it so the new values load.
Shellphp artisan config:clearSend and verify
Send a mailable (e.g.
Mail::to($user)->send(new WelcomeMail())) and confirm it in your Unitpost Activity view.