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 Contact Me for further assistance.