title: Setting replyTo field in email
body: <p>I have an SMTP question. I have created a PHP script to send out emails. The requirement is that I need to send email from 'email1@example.com' but I need replies to come to 'email2@example.com'</p>
  
  <p>I have added <code>email2@example.com</code> in the <code>reply-to</code> header field. The only problem I am having is that when someone receives the email and clicks on the reply button, both <code>email1@example.com</code> and <code>email2@example.com</code> are being shown in the <code>TO</code> field.</p>
  
  <p>Is there any way that I can have <code>email1@example.com</code> removed from the TO field and only show the email address that was specified in the <code>reply-to</code> field?</p>
  
  <p>I am using PHPMailer and the code is below:</p>
  
  <pre><code>    $this-&gt;phpmailer-&gt;IsSMTP();
      $this-&gt;phpmailer-&gt;Host = $server;
      $this-&gt;phpmailer-&gt;Port = $port;
      $this-&gt;phpmailer-&gt;SetFrom($fromEmail, $fromName); //this is email1@example.com
      $this-&gt;phpmailer-&gt;AddReplyTo($replyEmail,$fromName);  //this is email2@example.com
      $this-&gt;phpmailer-&gt;Subject = $subject;
      $this-&gt;phpmailer-&gt;AltBody = $msgTXT; // non-html text
      $this-&gt;phpmailer-&gt;MsgHTML($msgHTML); // html body-text
      $this-&gt;phpmailer-&gt;AddAddress($email);
  </code></pre>