Contact us form missing customers email address

Open to all! Ask other shopowners for help.
otgrouch
Member
Posts: 13
Joined: Wed Dec 06, 2023 4:27 pm
Phoenix Version:

Re: Contact us form missing customers email address

Post by otgrouch »

Just encountered this issue in my store. We aren't seeing the 'reply-to' field and when we reply to an enquiry, it gets sent to the email in the 'from' field, which is the email_from that is defined in configuration.

Is there some way to simply have the text of the email include the customer name and email address as entered in the form if we can't get the sent email to be from the customer email address?


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Contact us form missing customers email address

Post by heatherbell »

otgrouch wrote: Tue Mar 04, 2025 4:57 pmwe can't get the sent email to be from the customer email address?
What version are you using - that information is needed to get the support you need:
viewtopic.php?p=153#p153
A previous reply might already answer:
viewtopic.php?p=15563#p15563
otgrouch
Member
Posts: 13
Joined: Wed Dec 06, 2023 4:27 pm
Phoenix Version:

Re: Contact us form missing customers email address

Post by otgrouch »

Using 1.0.9.9.

The previous reply linked is this topic. I have tried everything mentioned here and it does not solve the issue. If an email client does not show full headers or reply to the 'reply-to' address, we have no idea who the enquiry is from nor have any way to respond to them.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Contact us form missing customers email address

Post by heatherbell »

otgrouch wrote: Tue Mar 04, 2025 4:57 pm Is there some way to simply have the text of the email include the customer name and email address as entered in the form if we can't get the sent email to be from the customer email address?
That is possible by overriding this file:
https://github.com/CE-PhoenixCart/Phoen ... ations.php

Edit to change this line:

Code: Select all

$message->add_message($email_text);
to:

Code: Select all

$email_text = "Customer Email: " . $from_email_address . "\n\n" . $email_text;
$message->add_message($email_text);
so the email received shows:

Screenshot 2025-03-04 182038.png
You do not have the required permissions to view the files attached to this post.
otgrouch
Member
Posts: 13
Joined: Wed Dec 06, 2023 4:27 pm
Phoenix Version:

Re: Contact us form missing customers email address

Post by otgrouch »

Thank you! I also added

$email_text = "Customer Name: " . $from_email_name . "\n\n" . $email_text;

to include the customer name in the body of the email. It requires copy/paste to respond to the Enquiry, but at least the information is coming through.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Contact us form missing customers email address

Post by heatherbell »

otgrouch wrote: Tue Mar 04, 2025 6:58 pm to include the customer name in the body of the email.
In which case:

Code: Select all

$email_text = "Customer Name: " . $from_email_name . "\n";
$email_text .= "Customer Email: " . $from_email_address . "\n\n" . $email_text;
$message->add_message($email_text);


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply