title: phpmailer not sending mail to gmail
body: <p>I have a email program that runs from a cron that was working, and now it doesn't. Well, it still works, but it doesn't send any emails to gmail. I have filters setup in gmail's filters to send all emails from: 'my domain' to my inbox instead of the spam folder, but now they don't even go to the spam folder. It works with yahoo and textfree.us.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>$alerttarget = $usersemail;
  $subject = "A bill is OVERDUE!";
  $body = "You have an overdue bill, in the amount of $" . $amount . ".";
  $from = $userId . date("YmdHis") . $billdetailId . "b@mydomain.com";
  
  sendemail($alerttarget, $body, $from, $subject);
  
  function sendemail($target, $body, $from, $subject)
  {
  
      $mail = new PHPMailer();
  
      $email = $target;
  
      $mail-&gt;IsSMTP(); // telling the class to use SMTP
      $mail-&gt;Host       = "localhost"; // SMTP server
      $mail-&gt;SMTPDebug  = 2; // enables SMTP debug information (for testing)
      $mail-&gt;SetFrom($from, "my domain");
      $mail-&gt;AddReplyTo($from, "my domain");
  
      $mail-&gt;Subject    = $subject;
  
      $mail-&gt;MsgHTML($body);
  
      $address = $email;
      $mail-&gt;AddAddress($address, "me");
  
  
      if(!$mail-&gt;Send()) {
          echo "Mailer Error: " . $mail-&gt;ErrorInfo;
      } else {
          echo "Message sent!";
      }
  }
  </code></pre>
  
  <p>I recently bought a new domain, and set the host to point to my ip address. I did this with godaddy's DNS manager. But, I only set the host to point to my ip address; nothing else. It stopped working, however, before I did all of this.</p>