title: Invalid Address in PHPMailer
body: <p>I'm getting an <code>invalid address</code> error while running the PHP script below. The SMTP credentials and recipient e-mail were altered for this post. They are all valid on the actual script. I don't know why the recipient e-mail is being rejected. I'm trying to send an e-mail with SMTP authentication, and SMTP security (SSL, TLS) is not required.</p>
  
  <p>Any help would be appreciated.</p>
  
  <pre><code>
    include 'PHPMailer_5.2.2/class.phpmailer.php';
  
    function SendConfirmation ($sName, $sEmail)
    {
      $mail = new PHPMailer ();
  
      $mail->SMTPDebug  = 2;
  
      $mail->Host = "mail.exchange.telus.com";
      $mail->IsSMTP ();
      $mail->Username = "inbin@website.com";
      $mail->Password = "password";
  
      $mail->From = "inbin@website.com";
      $mail->FromName = "Web Site";
  
      $mail->AddAddress ($sEmail, $sName);
  
      $mail->Subject = 'PHPMailer Test' . date ('Y-m-d H:i:s');
      $mail->Body = "This is a test.";
  
      if ($mail->Send ())
        echo "\r\nMail sent.";
      else
        echo "\r\nMail not sent. " .  $mail->ErrorInfo;
  
      echo "\r\n";
    }  
  
    /***[ Main ] **************************************************************************/
  
    $sName = 'Johan Cyprich';
    $sEmail = 'jcyprich@website.com';
  
    $bSent = SendConfirmation ($sName, $sEmail);
  </code></pre>