Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1426697

    Hi Team, is there a way our contact form sends the mail to our address using the user mail as sender and not the no-reply mail of wordpress?

    #1426762

    Hey John,

    Thank you for the inquiry.

    You can use the avf_form_from filter to change the “from” address to the sender’s email address, but this might lead to the messages being filtered as spams and not reaching the receiving address.

    function avf_change_cf_from($send_from, $new_post, $form_params) {
        return $new_post['1_1'];
    }
    add_filter('avf_form_from', 'avf_change_cf_from', 10, 3);
    

    The key 1_1 refers to the first field in the contact form. If the email field is the third field in the contact form, you should replace the key with 3_1.

    Best regards,
    Ismael

    #1426765

    Hi Ismael, thank you very much, where do i make this change?

    #1426820

    Hi,
    Try adding the code to your child theme functions.php and adjust to suit.
    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

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