I recommend using a 3rd party service for sending email. They usually offer SMTP support, and great logging and analytics. Especially on a shared host, where email is locked down, and a "naughty neighbor" can quickly get the server/IP you're emailing from blacklisted. I highly recommend using a service over SMTP, because SMTP slows response times down.
These services are supported by Laravel natively;
- Mailgun - Free, up to 10k messages/month
- Postmark - Tell their support you were referred for a free month
- Amazon SES - Super cheap, free if you're using EC2
To configure SMTP, in your
env.php file, you need to configure the following options:
To use Mailgun, set your
MAILGUN_DOMAIN='your mailgun domain'
MAILGUN_SECRET='your mailgun secret',
To use Postmark, set your
POSTMARK_TOKEN='your postmark token'
To use SES, set your
AWS_DEFAULT_REGION='the region if not us-east-1'
For debugging mail, you can use the service mailtrap.io. Mail-trail will show all of the incoming and outgoing email in an inbox, so you can test registrations, accepts, etc. It will provide you Laravel-specific configuration, which looks something like: