Tagged: CONTACT FORM, email
-
AuthorPosts
-
October 12, 2019 at 9:21 am #1147319
Hi
Recently I am receiving emails from potential customers that DO NOT have their email address in the ‘from’ field. I am using the built-in Enfold contact form
https://www.swarez.co.uk/contact-me/
So how come I get the ‘from’ field populated with (Email address hidden if logged out) ‘ instead of the customer’s email address? It’s not often but it is a potential for lost business as I can’t then contact them back.
My webhost (SiteGround) say everything is fine at server level.
I contacted one person (who left their phone number) and they said they entered their email address properly so something is stripping out that information and replacing it with the ‘no-reply’
UPDATE: I tested with my own Gmail address and it returns the ‘no-reply’… never used to be like this. Can you look into the theme changes please so we can see if something is causing the problem?
Any ideas?
Thanks in advance
EdPS – I have already added this code to my child theme functions.php:
add_filter( 'avf_form_mail_header', 'enfold_contact_form_add_replyto', 10, 3 ); function enfold_contact_form_add_replyto( $header, $p1, $p2 ) { global $enfold_visitor_from; $header .= 'Reply-To: ' . $enfold_visitor_from . "\r\n"; return $header; }
- This topic was modified 5 years, 2 months ago by Swarez.
October 13, 2019 at 5:19 am #1147502Hey Swarez,
Sorry for the problem. First off, could you try updating the theme to the latest version (4.6.3.1) to see if that helps please? https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#theme-update. If not then please post admin login details in private so that we can have a closer look.
Best regards,
RikardOctober 13, 2019 at 11:17 am #1147557Hi Rikard
All updates done, caches cleared and asked for a couple of test emails from Facebook friends – still the same problem….
Thanks
EdOctober 16, 2019 at 3:13 pm #1148478Hi,
Thank you for the update.
Did you use the “avf_form_from” filter in conjunction with the filter you posted above?
// https://kriesi.at/support/topic/change-from-in-the-contact-form/#post-1055920
You can replace the filter with the following code if you want to use the value of the email field as the Reply-to address.
add_filter( 'avf_form_mail_header', 'avf_form_mail_header_mod', 10, 3 ); function avf_form_mail_header_mod( $header, $post, $params ) { $header .= 'Reply-To: ' . $post['2_1'] . '\r\n'; return $header; }
Best regards,
IsmaelOctober 16, 2019 at 3:18 pm #1148479Hi Ismael
Thank you for the update – no, I haven’t’ used any filters as you mention.
Not sure how I even do that to be honest!
Shall I just cut and paste your code in place of the code i posted?
Many thanks
EdOctober 18, 2019 at 6:17 am #1149115Hi,
Yes, you can use the snippet above to replace the previous one, or the filter you posted above. Let us know how it goes.
Thank you for the update.
Best regards,
IsmaelOctober 19, 2019 at 10:24 am #1149480Thanks Ismael – I will paste the new code and test!
Thank you
EdOctober 20, 2019 at 6:10 am #1149562 -
AuthorPosts
- You must be logged in to reply to this topic.