PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

From and Reply To Fields Not Working -- Always Shows as Coming from No-Reply@

  1. I'm having an issue with a contact form running on WP 3.0.1 and GF 1.4.3.1. The notification emails are sent correctly BUT they always show as being from the main WP site. So instead of showing up as being sent from webmaster@clientsite.com, they show up as being from no-reply@mainsite.com. The GF settings are correct and I've tested with various combinations of reply to and from email addresses but nothing seems to affect it. Any thoughts?

    Posted 14 years ago on Tuesday September 28, 2010 | Permalink
  2. Found the culprit, posting in case it saves anyone else a headache. I had Buddypress installed and apparently that's overwriting the built in wp_mail function. Haven't dug into Buddypress yet to see where it's doing that and fix it, but that's the issue.

    Posted 14 years ago on Tuesday September 28, 2010 | Permalink
  3. The problem is in Buddy Press / bp-core / bp-core-filters.php. Very first filter is bp_core_email_from_name_filter(). Commented that out (for now) and problem solved.

    Posted 14 years ago on Tuesday September 28, 2010 | Permalink
  4. Sounds like that is something BuddyPress shouldn't be doing, you may want to bring this to the attention of the BuddyPress developers at the BuddyPress site and explain how it causes issues with other plugins that use the wp_mail function. I will do the same.

    Posted 14 years ago on Tuesday September 28, 2010 | Permalink
  5. Yeah, I"ll drop them a note and point it out. There's a lot to love about Wordpress, but it would be such a better platform if there were some process for vetting plugins before they make it into the repository to ensure they're meeting WP best coding practices. I'll let you know if I hear anything back.

    Posted 14 years ago on Tuesday September 28, 2010 | Permalink
  6. gwc_wd
    Member

    I'm not a coder but have been exposed to some things out of necessity. One of them is code for "remove action" code in bp-custom.php (particularly to remove the social network fields from the bp registration form)

    Would there be some similar code that could be used to nullify the bp_core_email_from_name_filter() so as to maintain the edit between updates?

    Posted 14 years ago on Sunday October 24, 2010 | Permalink
  7. @gwc_wd - You are correct. This can be accomplished without hacking the BuddyPress core.

    Just add this to your theme's functions.php file (you may need to create that file first)

    remove_filter('wp_mail_from_name', 'bp_core_email_from_name_filter');

    Posted 14 years ago on Thursday November 4, 2010 | Permalink
  8. gwc_wd
    Member

    Thanks. I'll drop it into bp-custom.php to see if it works there and report back. The idea being to avoid editing functions.php because you then lose those edits if the theme is updated. Complicated world <smile>.

    Posted 14 years ago on Thursday November 4, 2010 | Permalink