PHP's mail() function, and everything built on it such as WordPress password
resets and contact forms, can now send email from a web hosting. Before, it
failed without saying so.
To turn it on:
- Add a domain under Email in the control panel and finish its DNS setup, so it is verified for sending.
- On the hosting's overview, choose that domain and the mailbox name to send
as, such as
wordpress@example.com, and press Turn on email.
This creates an SMTP credential for the hosting, listed with the domain's other credentials. All mail from the hosting leaves as that one address, including mail from PHP you run over SSH or in the console. Every email is billed on your project's email plan, the same as any other email, which is why nothing is sent until you turn it on.
Until email is on, mail() returns false and the reason is written to the
hosting's error log, so a form can tell its visitor the message was not sent.
Press Turn off to stop sending.
See Sending email for the details.