Sending email with PHP from an SMTP server

Posted by Editorial Staff | Updated on

In this example, we have shared Sending email with PHP from an SMTP server. When you are sending an e-mail through a server that requires SMTP Auth, you really need to specify it, and set the host, username and password (and maybe the port if it is not the default one – 25).

For example, I usually use PHPMailer with similar settings to this ones:

You can find more about PHPMailer here:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers