Perhaps this is the intended behaviour but I discovered that when VFB Pro sends outs its emails, it tries to determine a default From Header email address and overrides it if it happens to have a different domain than the site resides on.
Presumably this is because SOME email servers consider a different "From" domain as a sign of Spam (without other overrides in place).
However if it detects a different domain it substitutes "wordpress"@mydomainname.com which is a non-existant email address.
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. Not the single quote. ]
// Use the admin_email as the From email $from_email = get_site_option( 'admin_email' ); // Get the site domain and get rid of www. $sitename = strtolower( $_SERVER['SERVER_NAME'] ); if ( substr( $sitename, 0, 4 ) == 'www.' ) $sitename = substr( $sitename, 4 ); // Get the domain from the admin_email list( $user, $domain ) = explode( '@', $from_email ); // If site domain and admin_email domain match, use admin_email, otherwise a same domain email must be created $from_email = ( $sitename == $domain ) ? $from_email : "wordpress@$sitename";
I could override this for my purpose, but I was wondering why it was done. Many plugins allow the From email to be the email entered in the Form itself by the user, or taken from a purposeful setting field in the Plugin, or from the domain admin_email as this code does originally. Why not?