Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #304793

    Hello! In testing the contact form, I entered my personal email address into the form and received the auto generated response from the system confirming receipt of the inquiry. It worked perfectly (yay!).

    The problem? If my potential client wanted to then reply to that auto-response email, the reply-to email address is invalid.

    Can you point me to where I can change that reply-to email address? Image linked below.

    Thank you!

    #305226

    Hi Irja!

    Yes sure – insert this code into the child theme functions.php file (or enfold/functions.php):

    
    add_filter('avf_form_autoresponder_from', 'avia_change_autoresponder_from', 10, 3);
    function avia_change_autoresponder_from($from, $new_post, $form_params){
    $from = " (Email address hidden if logged out) ";
    return $from;
    }
    

    and replace (Email address hidden if logged out) with your email address.

    Cheers!
    Peter

    #305361

    Hi there. So, that didn’t quite fix the problem. What it did was redirect the auto-response email meant for the client (the “thanks for subscribing/writing” email) to my email address instead.

    What I want is for the auto-response email that the client receives to have a reply-to/from email address, that will actually come back to me, in the event that they reply to the auto-response.

    In the image I uploaded, the circled address is what I want to change. Thanks!

    #305364
    This reply has been marked as private.
    #305370

    Awesome… and now I’ve removed the code only to have my entire site disappear. Cannot access anything — /wp-admin only brings up a blank page.

    I tried going through the backend FTP to replace the file function-enfold.php file with the original matching file from the theme files. Made the replacement, but the site is still down. Help?

    #305752

    Hi!

    1) Try to clear the browser cache – maybe the browser still caches the “broken” website. If this doesn’t help make a backup of the current theme folder and upload/replace all theme files with the original, unmodified theme files.

    2) If the “from” filter code I posted above doesn’t work try to modify the email header directly and add a “reply-to” email address. Insert this code into the theme functions.php file:

    
    
    add_filter('avf_form_mail_header', 'avia_change_autoresponder_from', 10, 3);
    function avia_change_autoresponder_from($header, $new_post, $form_params){
    global $avia_config;
    if(!empty($avia_config['autoresponder_active']))
    {
            $from = " (Email address hidden if logged out) ";
            $header .= 'Reply-To: ' . $from . "\r\n";
    }
    else
    {
            $avia_config['autoresponder_active'] = true;
    }
    return $header;
    }
    
    

    and the autoresponder mail should point to the (Email address hidden if logged out) email adress.

    Best regards,
    Peter

    #306456

    Hi Peter,

    Thank you! That code mostly worked. The ‘From’ address still reads that @box668.bluehost.com, but the reply to address is correct, which I suppose is good enough. :)

    Also, to fix the issue with the site disappearing — it was literally a blank page, I couldn’t even access word press to make a back up — I had to locate the functions-enfold.php files in the latest/orig theme files and use that to overwrite the corrupted file via FTP. Once I did, the site popped right back up.

    As it turned out, when I removed the previously provided code, I removed one } too many and messed it all up.

    Thanks for your help! Much appreciated.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Can I change the contact form's autoresponse reply-to email?’ is closed to new replies.