0

When the form email lands in my inbox, I would like the "from email" (FromName) to reflect the senders email address name. This is with the popular recaptcha form plugin: http://wordpress.org/plugins/recaptcha-form/

Instead, the email comes in with the mother-site-tld.com domain - the name of the multisite not even the subsite - in the fromname field, which makes it a pain to reply to.

Yet this works fine and dandy on other multisites I have and I cannot recall going to any great lengths to get it to work correctly ever before ...

Thanks

Phillip

2 Answers 2

0

By default wordpress uses $_SERVER['SERVER_NAME'] variable to get your current hostname.

You have two filters available in wordpress to change from name / email:

add_filter('wp_mail_from', '[email protected]'); add_filter('wp_mail_from_name', 'username');

0
0
<?php 
/*
* Plugin Name: Just Use the Blog Name
* Description: Ensures that the FromName is the BlogName
* Plugin URI:  
* Version:     0.1
* Author:      Bottomofthestack
* Author URI:  
* License:     MIT
*/
function just_use_the_blog_name(){
 return get_option('blogname'); 
}
add_filter( 'wp_mail_from_name', 'just_use_the_blog_name' );

Still leaves the problem that the replyto probably ought to simply be the email of the sender, not my blogname, but that is probably a question for the recaptcha plugin author?

NB this doesn't work in mu-plugins, which would be handy

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.