How to use amazon smtp with phpmailer ?

    To use amazon smtp in php using php mailer follow the steps below. Also download full phpmailer so that you have class.phpmailer.php and class.smtp.php
    //Dowload phpmailer and include that first

    //Then do SMTP settings for it
    $mail = new PHPMailer();
    $mail->SMTPAuth   = true; // SMTP Authentication true
    $mail->SMTPSecure = "tls"; // SMTP secure tls it will use its default port
    $mail->Host       = ""; // Amazon Hostname will be
    $mail->Username   = ""; // Amazon SMTP Username
    $mail->Password   = ""// Amazon SMTP Password

    $mail->SetFrom('', 'Site Name or Sender Name'); // This is verified email otherwise it will not work
    $mail->Subject = ""; // Subject Here
    $body = ""; // Email Body Here
    $body = eregi_replace("[]",'',$body);
    //Multiple or single recipient
    $mail->AddAddress("", "Rajeev Singh");
    $mail->AddAddress("", "Yashwant Singh");
    if (
    $mail->Send()) {
    "Your message sent";
    else if(!
    $mail->Send()) {
    Average: 5 (1 vote)