Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Domain Name & DNS Issues  >  Send Email From a PHP Script Using SMTP Authentication
Top Scroll

Send Email From a PHP Script Using SMTP Authentication

 2 min

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.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.