title: PHPMailer on godaddy server, setup correctly?
body: <p>I've just signed up for a godaddy server to test a PHP script I'm writing. I'm using PHPMailer to send a emails, it uses the godaddy email Host : relay-hosting.secureserver.net</p>
  
  <p>The problem is that I would like to mark the email as from "me"@gmail.com</p>
  
  <p>When I've sent emails using my gmail address in the AddReplyTo field the recipient email account sends it straight to the Junk folder.</p>
  
  <p>I know there is a fundamental problem here, that I'm sending conflicting headers and this is probably why it gets put into the junk folder.</p>
  
  <p>Can someone please explain to me how I can resolve this. Thank you.</p>
  
  <p>Code:</p>
  
  <pre><code>try {
      $mail = new PHPMailer(true);
      $mail-&gt;IsSMTP(); // Using SMTP.
      $mail-&gt;CharSet = 'utf-8';
      $mail-&gt;SMTPDebug = 2; // Enables SMTP debug information - SHOULD NOT be active on production servers!
      $mail-&gt;SMTPAuth = false; // Enables SMTP authentication.
      $mail-&gt;Host = "relay-hosting.secureserver.net"; // SMTP server host.
  
      $mail-&gt;AddReplyTo('me@gmail.com', 'Me');
      $mail-&gt;AddAddress('them@hotmail.co.uk', 'Them'); 
      $mail-&gt;SetFrom('me@gmail.com', 'Me');
      $mail-&gt;Subject = 'PHPMailer Test Subject via smtp, basic with authentication';
      $mail-&gt;AltBody = 'To view the message, please use an HTML compatible email viewer!';
      $mail-&gt;MsgHTML("Hi, this is an test email");
      $mail-&gt;Send();
  } catch (phpmailerException $e) {
      echo $e-&gt;errorMessage(); 
  } catch (Exception $e) {
      echo $e-&gt;getMessage(); 
  }
  </code></pre>