title: PHPMailer SMTP Error 550
body: <p>I'm using PHPMailer to send email via SMTP on a shared server (my hosting service is Softsys). Email is being sent fine to email addresses on the same server (i.e. the @ domain is my webdomain). However, when I try to change the recipient to @gmail (or any external address) I get the following error log:</p>
  
  <pre><code>SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "550 &lt;jDoe@gmail.com&gt; No such user here"
  SMTP -&gt; get_lines(): $data is "550 &lt;jDoe@gmail.com&gt; No such user here"
  SMTP -&gt; FROM SERVER:550 &lt;jDoe@gmail.com&gt; No such user here
  SMTP -&gt; ERROR: RCPT not accepted from server: 550 &lt;jDoe@gmail.com&gt; No such user here
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "250 OK"
  SMTP -&gt; get_lines(): $data is "250 OK"
  SMTP -&gt; FROM SERVER: 250 OK
  Message could not be sent.
  Mailer Error: SMTP Error: The following recipients failed: jDoe@gmail.com
  </code></pre>
  
  <p>Is this an issue with my server or my code? Should I just contact my server admin? Thank you in advance for any help!</p>
  
  <p>Here's my code</p>
  
  <pre><code>require("class.phpmailer.php");
  $mail = new PHPMailer();
  
  $mail-&gt;IsSMTP();
  $mail-&gt;Host = "mail.mywebsite.com";
  $mail-&gt;SMTPAuth = true;
  $mail-&gt;Username = "myemail";
  $mail-&gt;Password = "********";
  $mail-&gt;From = "myemail@mywebsite.com";
  $mail-&gt;FromName = "John Doe";
  $mail-&gt;AddAddress("jDoe@gmail.com");    
  
  $mail-&gt;IsHTML(true);
  
  $mail-&gt;Subject = "Here is the subject";
  $mail-&gt;Body    = "This is the HTML message body &lt;b&gt;in bold!&lt;/b&gt;";
  $mail-&gt;AltBody = "This is the body in plain text for non-HTML mail clients";
  
  if(!$mail-&gt;Send())
  {
     echo "Message could not be sent. &lt;p&gt;";
     echo "Mailer Error: " . $mail-&gt;ErrorInfo;
     exit;
  }
  
  echo "Message has been sent";
  </code></pre>