Send PHP mail via SMTP

Overview

When you use the PHP mail function to send email from your website, you are sending email directly from your web server. This method is not recommended as it may cause issues if the FROM address isn’t set properly or if your email isn’t hosted with DreamHost.

View the PHP mail troubleshooting article for further details.

SMTP mail

Sending mail via SMTP is recommended as this method sends email from the mail server rather than the web server. This significantly helps to ensure your email is properly sent and delivered.

PHPmailer

DreamHost recommends using PHPmailer to send email via SMTP.

  • PHPMailer is very well documented with many online examples and help pages.
  • PHPMailer integrates well with Google's SMTP servers.

 View the following articles for further details and instructions on how to install PHPmailer on your server.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?