I have tried searching sitepoint and believe many people including myself would benifit from a walk-through on phpmailer. There are many posts that are related to different parts but none that cover from script install through to form design.
<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.email.com"; // SMTP server
$mail->From = "from@email.com";
$mail->AddAddress("myfriend@site.com");
$mail->Subject = "first mailing";
$mail->Body = "hi ! \
\
this is First mailing I made myself with PHPMailer !";
$mail->WordWrap = 50;
if(!$mail->Send())
{
echo "Message was not sent";
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent";
}
?>
Upload to the same diectory as before and browse to the file. The Message should be sent and confirmation message appear.