Post by Ulf » Fri Dec 21, 2018 3:19 am

Hello,
when I reply an email request, the message will be sent to the store's email address instead of the customer's email address.
Would like to know how to change the code so I do not need to manually in Gmail change to the customer's email address.
The error is the same regardless of whether the customer sends from contact form, orders or a product question.
I have been using the online store since 2012 and the problem began a month ago before the email address has been correct.

Image shows when the email address was correct
Image


From a month ago it will be the store's email address To: order@dinhoj.se
Image

Use Gmail and OC version 1.5.2.1
Last edited by Ulf on Sat Dec 22, 2018 3:43 pm, edited 2 times in total.

Ulf
New member

Posts

Joined
Sat Oct 16, 2010 4:41 pm

Post by ADD Creative » Fri Dec 21, 2018 3:53 am

Are you talking about the contact form? The default for 1.5.x was to use the customer's email as the from address. What are you seeing as the from address in the email headers?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Ulf » Fri Dec 21, 2018 5:29 pm

thanks for the reply
I have updated my question and added pictures

Ulf
New member

Posts

Joined
Sat Oct 16, 2010 4:41 pm

Post by ADD Creative » Fri Dec 21, 2018 7:22 pm

For the contact form the from address is set here. https://github.com/opencart/opencart/bl ... ct.php#L20

As you can see it is already set to be the customers address. That means that you either have a modification that modifies the email system or your email provider is is replacing the from address, maybe as some sort of security measure.

What are you seeing for from and reply-to addresses in the headers or emails your receive? What you have posted is your reply headers which is no help.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Ulf » Sat Dec 22, 2018 4:04 pm

have used the code below since year 2012 and it has worked until a month ago
I have now also tested with standard OC version 3.0.2 and the problem will be the same
reply email address will be our webshop email address
Either it's Gmail or our provider Contabo that has increased security.
Is there possibly a new code to get it to work?

Image

Ulf
New member

Posts

Joined
Sat Oct 16, 2010 4:41 pm

Post by ADD Creative » Sun Dec 23, 2018 4:22 am

You could try changing the line.

Code: Select all

$mail->setFrom($this->config->get('config_email'));
To.

Code: Select all

$mail->setFrom($this->request->post['email']);

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 10 guests