Title: Changing From address
Last modified: August 22, 2016

---

# Changing From address

 *  Resolved [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/changing-from-address/)
 * Hello Lester,
 * nice plugin, but we are having issues when using it with gmail.com – the “from”
   address doesn’t change. I think you need to have a look – gmail.com might be 
   blocking the change in the “from” field. Perhaps it will let you to do so if 
   you add the “Return-path” email to the original sender.
 * Thanks,
    Martin
 * [https://wordpress.org/plugins/wp-email/](https://wordpress.org/plugins/wp-email/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/changing-from-address/#post-5286598)
 * You mean sending the email or the receiving end?
 *  Thread Starter [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/changing-from-address/#post-5286865)
 * Hello Lester,
 * if gmail.com is used for the SMTP service it won’t let you change the From address.
   Perhaps adding an option to use ReplyTo field could help as well.
 * Thanks,
    Martin
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/changing-from-address/#post-5286870)
 * Add this before Line 949 of [https://github.com/lesterchan/wp-email/blob/master/wp-email.php#L949](https://github.com/lesterchan/wp-email/blob/master/wp-email.php#L949)
 *     ```
       $mail->AddReplyTo('replyto@email.com', 'Reply to name');
       ```
   
 * let me know if it works.
 *  Thread Starter [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/changing-from-address/#post-5286871)
 * Hello Lester,
 * at this point we don’t have a place to test this, as we already asked our client
   to not use gmail.com for this kind of mailing. If you add the option to switch
   from “From” to “ReplyTo”, that would make your plugin more resilient.
 * Idealy you should always be using wp_mail to send the emails if there is no STMP
   configuration entered (I know that’s more and more testing). We use WP Mail SMTP
   plugin to configure SMTP on our websites and don’t see a point in entering it
   again in your plugin: [http://wordpress.org/plugins/wp-mail-smtp/](http://wordpress.org/plugins/wp-mail-smtp/)
 * Thanks,
    Martin
 *  Plugin Author [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/changing-from-address/#post-5286872)
 * Yeap. I agree with you. Ideally it should be using wp_mail. The code is old and
   it works so I will not touch it unless I have to.
 *  Thread Starter [FolioVision](https://wordpress.org/support/users/foliovision/)
 * (@foliovision)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/changing-from-address/#post-5286890)
 * Hello Lester,
 * I just sent an email to my gmail.com address and the **SPF fails**. Here’s an
   excerpt from headers:
 *     ```
       Delivered-To: my-email@gmail.com
       Received: by 10.221.72.205 with SMTP id yp13csp95494vcb;
               Fri, 19 Sep 2014 00:45:23 -0700 (PDT)
       X-Received: by 10.66.138.46 with SMTP id qn14mr12758081pab.77.1411112723502;
               Fri, 19 Sep 2014 00:45:23 -0700 (PDT)
       Return-Path: <my-email@foliovision.com>
       Received: from p3plsmtpa08-06.prod.phx3.secureserver.net (p3plsmtpa08-06.prod.phx3.secureserver.net. [173.201.193.107])
               by mx.google.com with ESMTP id m1si1545522pdr.159.2014.09.19.00.45.22
               for <my-email@gmail.com>;
               Fri, 19 Sep 2014 00:45:22 -0700 (PDT)
       Received-SPF: fail (google.com: domain of my-email@foliovision.com does not designate 173.201.193.107 as permitted sender) client-ip=173.201.193.107;
       Authentication-Results: mx.google.com;
              spf=hardfail (google.com: domain of my-email@foliovision.com does not designate 173.201.193.107 as permitted sender) smtp.mail=my-email@foliovision.com
       Received: from www.site.com ([162.242.234.125])
       	by p3plsmtpa08-06.prod.phx3.secureserver.net with
       	id svlM1o00K2j0KJy01vlMvK; Fri, 19 Sep 2014 00:45:22 -0700
       X-Sender: the-actual-sender@site.com
       Date: Fri, 19 Sep 2014 07:45:21 +0000
       Return-Path: <my-email@foliovision.com>
       To: my-email@gmail.com
       From: Martin <my-email@foliovision.com>
       ```
   
 * So this is a **problem** – you should keep the Return-Path the real sender. Otherwise
   the SPF check fails. Notice that something adds the X-Sender field (probably 
   the outgoing SMTP), but it appears this is not checked by SPF.
 * Thanks,
    Martin

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Changing From address’ is closed to new replies.

 * ![](https://ps.w.org/wp-email/assets/icon.svg?rev=978017)
 * [WP-EMail](https://wordpress.org/plugins/wp-email/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-email/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-email/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-email/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-email/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-email/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [FolioVision](https://wordpress.org/support/users/foliovision/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/changing-from-address/#post-5286890)
 * Status: resolved