Saturday 31 March 2012

Tagged under: , , , ,

Sending email using PHP...(PHPMailer)

Sending emails using PHP is an easy task...Just a few steps and you are through!!

Step I: Download PHPMailer
The very first thing that needs to be done is, downloading the PHPMailer package. This package contains all the methods for sending simple mails, to sending mails with attachments!!
You can download the package from: PHPMailer

Step II: Starting to Code
Create a new php file test.php and copy the following code:
(Note: test.php file should be in the same folder as the extracted PHPMailer package)

The above code uses the gmail SMTP server...You have to mention the username and password of your gmail account!!

This is it!! You are now all ready to send mail!!

My next post will include sending attachments in emails....and also using mail() method!! So, keep visiting!!

You can for further assistance.

Kindly Bookmark and Share it: