MilesWeb
Leading Web Hosting Provider in India Since 2012.
Award-winning Web Hosting Company
Everything that you need to build, host and manage a website is available at just 109/mo

Send Email From a PHP Script Using SMTP Authentication

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

When sending email it is recommended to use SMTP authentication for sending emails. If you are not using any CMS OR a custom coded website, use the steps below to enable SMTP authentication in your contact form.

Login to your cPanel & access option PHP PEAR Packages. Under Find a “PHP Extensions and Applications Package”, find for mail and click on Go. Install Mail which is listed under the Module Name as below.

Once you install the above package, download the contact.php file with a sample contact.html page from http://ecloudwire.com/contact.tar

Replace the details below with the actual ones.

  • from: the email address from which you want the message to be sent
  • to: the recipient’s email address and name.
  • host: your outgoing SMTP server name.
  • username: the SMTP user name (typically the same as the username used to retrieve mail).
  • password: the password for SMTP authentication.

Once done, you can try sending the emails and the emails would be sent using SMTP authentication.

Leave a Reply

Your email address will not be published. Required fields are marked *