phpmailer comes with example.
you can play with it.
in class.phpmailer.php make the following configuration
$Mailer = 'smtp'
$Host = 'your host name'
$Port ='your server smtp port'
$Username = 'from email addredd'
$Password = 'password'
It also contains debug feature.
to use this enable it ($SMTPDebug = true)
example
include_once('../class.phpmailer.php');
$mail = new PHPMailer();
$body = eregi_replace("[]",'',$body);
$subject = eregi_replace("[]",'',$subject);
$mail->From = "from email address";
$mail->FromName = "First Last";
$mail->Subject = "subject";
$mail->AltBody = "body";
$mail->MsgHTML($body);
$mail->AddAddress("to email address");
if(!$mail->Send()) {
echo 'Failed to send mail';
} else {
echo 'Mail sent';
}
you can also send attachments using this.