Visual Form Builder
[resolved] VFB Pro Email From Header (4 posts)

  1. websherpa
    Posted 3 years ago #

    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?


  2. websherpa
    Posted 3 years ago #

    I see this was addressed here: http://wordpress.org/support/topic/no-email-sent-to-admin-of-site?replies=20

    But I still think there's some work to be done to figure out a smoother email confirmation Header and Envelope, as I haven't had these kinds of issues with other form confirmations coming from my WP sites before.

  3. Matthew Muro
    Plugin Author

    Posted 3 years ago #

    This behavior is exactly what happens in the wp_mail function.

    I'm replicating it here because of the server issues you mentioned. This email is only used as the Sender and has proven effective.

    The From and Reply-To will always be what you set in the VFB settings. If you look at the rest of the code (especially the headers) you'll see that.

  4. websherpa
    Posted 3 years ago #

    Unfortunately, after wrestling with NONCE error, and then inconsistent emailing issues (sometimes it sends confirmations, sometimes it doesn't), I'll have to conclude that this Plugin requires a bit more work to employ in production (for us). It is "sooo close" - but the emailing routines (and nonce check) just aren't playing nice with our server configuration (or something).

    Thank you Matt for your work on this otherwise great Plug-in. We'll revisit it for use at a later release and you can keep my payments as a donation to a work in progress.

    I would also suggest that for paid Pro versions you include a direct email for support as communicating through the WordPress Forum for specific installation issues is a bit cumbersome.

    Thank you!
    Wayne Powell

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Visual Form Builder
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic