IsSMTP(); // set mailer to use SMTP $mail->Host = "pop.myserver.com"; // specify main and backup server $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "srikanth"; // SMTP username $mail->Password = "mypass"; // SMTP password $mail->From = "from@somedomain.com"; $mail->AddAddress("to@somedomain.com"); // name is optional $mail->Subject = "Here is the subject"; $mail->Body = "This is the HTML message body"; $mail->AltBody = "This is the body in plain text for non-HTML mail clients"; if(!$mail->Send()) { echo "Message could not be sent."; } else { echo "Message has been sent"; } ?>