It considered bad practise to send mail through your own server. Instead a lot of people will use some form of SMTP, but STMP can be slow and its recommended that you use an API from a large provider. We've chosen Mailgun as they offer 10,000 emails for free per month - which should be enough for most sites.
First sign up for an account at Mailgun. Once signed up you can go Domains -> Add Your Domain. If I was setting one up for
bigbitecreative.com I would enter into the box:
mg.bigbitecreative.com. You will be asked to make some changes to your DNS. Once these are completed you should see this at the top of your settings:
Now lets open the
.env and you see some mailgun settings:
MAILGUN_KEY=key-xxxxxxxxxxxxxxx-xxxx MAILGUN_DOMAIN=domain.com MAILGUN_FROMemail@example.com
Lets update them with the info above.
MAILGUN_KEY=key-myapikey-here MAILGUN_DOMAIN=mg.bigbitecreative.com MAILGUN_FROMfirstname.lastname@example.org
And thats it! Your site will now be setup to use Mailgun to send emails.