Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #831376

    Hi Guys!

    I’ve seen a number of similar posts and have a partial solution, but not a whole one. I need to be able to change the From: address to an address that I host, which I can do with this code…

    add_filter('avf_form_from', 'avia_change_from', 10, 3);
    function avia_change_from($from,$new_post,$params){
      $from = ' (Email address hidden if logged out) ';
      return $from;
    }

    I need to be able to change the Reply-To: address to the address submitted by the user, which I can do with this code…

    add_filter( 'avf_form_from', 'enfold_customization_contact_form_etc', 10, 3 );
    function enfold_customization_contact_form_etc( $from, $p1, $p2 ) {
    	global $enfold_custom_reply_header;
    	$enfold_custom_reply_header = $from;
    }
    add_filter( 'avf_form_mail_header', 'enfold_customization_contact_form_etc2', 10, 3 );
    function enfold_customization_contact_form_etc2( $header, $p1, $p2 ) {
    	global $enfold_custom_reply_header;
    	$header .= 'Reply-To: ' . $enfold_custom_reply_header . '\r\n';
    	return $header;
    }

    However I need to be able to do BOTH, and it’s not working. When I use these three routines together, the message sends, but the Reply-To: header looks like this…

    Reply-To: " (Email address hidden if logged out) \\r\\nFrom: (Email address hidden if logged out) " < (Email address hidden if logged out) >

    Without changing the From:, the message won’t send because the From: address must match the address used for SMTP Auth. Without the correct Reply-To:, my clients cannot do quick replies like they should be able to do.

    I am using the WP-Mail-SMTP plugin, which has the correct settings and has worked well in the past, but the Enfold contact form seems to ignore these settings. If you guys have a suggestion for a different SMTP mail plugin that works better with Enfold, I’d be willing to give it a shot.

    Thanks!

    • This topic was modified 6 years, 8 months ago by scotthco.
    #832695

    Hey scotthco,

    You can try to use this plugin: https://br.wordpress.org/plugins/wp-mail-smtp/

    Best regards,
    John Torvik

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.