title: Cannot set Custom Sender email using PHPMailer and smtp.gmail.com
body: <p>I am using PHPMailer and smtp.gmail.com to send emails to my users. 
  Emails are sent, no problem with that, but on the client side, in the sender email address, there is showing my servers host email address, not my email address that is set with PHPMailer->SetFrom(). I want to set my email address as sender email.
  I'm using php 5.4 &amp; PHPMailer 5.2.4
  My code is given below : </p>
  
  <pre><code>&lt;?php 
      require_once('class.phpmailer.php');
      $mail = new PHPMailer(true); 
  
  
      try {
        $mail-&gt;SMTPDebug  = 2;
        $mail-&gt;SMTPAuth   = true;                  
        $mail-&gt;SMTPSecure = "ssl";                 
        $mail-&gt;Host       = "smtp.gmail.com";      
        $mail-&gt;Port       = 465;                   
        $mail-&gt;Username   = "myemail@gmail.com";  
        $mail-&gt;Password   = "PASSWORD";
  
        $mail-&gt;AddAddress('receiver@email.com', 'John Doe');
        $mail-&gt;SetFrom('myemail@email.com', 'My Name');
  
        $mail-&gt;addReplyTo('myemail@gmail.com', 'My Name');
        $mail-&gt;Subject = 'PHPMailer Subject';
  
        $mail-&gt;MsgHTML('This is the body');
        $mail-&gt;Send();
        echo "Message Sent";
  
      } catch (phpmailerException $e) {
        echo $e-&gt;errorMessage();
      } catch (Exception $e) {
        echo $e-&gt;getMessage(); 
      }
  
  
  
  ?&gt;
  </code></pre>