This is the newPHPMail function that make you send the mail with the esieast way. To run this script you just have to follow some steps:-
To use PHPMailer:
Step 1:- Download the PHPMailer script from here
Now Extract the archive and copy the script's folder to a convenient place in your project.
Include the main script file -- require_once('path/to/file/class.phpmailer.php');
And that's it will work when you call newPHPMailer()