Page 1 of 1

[SOLVED] - Contact form not working correctly - senders email overwritten with store email

Posted: Thu Mar 19, 2020 9:13 am
by jrunique
Open cart Version 3.0.3.2
Hello, I have a strange problem with my contact form. The email entered by the sender is replaced with my store email address. This is a new install. I have received a couple of new sales enquires however I'm unable to reply to them because the customers email has been overwritten with my own email address.
Thanks for any help you can provide.

Re: Contact form not working correctly - senders email overwritten with store email

Posted: Thu Mar 19, 2020 9:44 am
by letxobnav
seems like the latest version of 3.0.3.2 is wrong there.
in catalog/controller/information/contact.php

change

Code: Select all

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

Code: Select all

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

Re: Contact form not working correctly - senders email overwritten with store email

Posted: Thu Mar 19, 2020 10:21 am
by jrunique
Thank you for your fast reply. I changed that line of code, however it didn't seem fix the problem. :(

Re: Contact form not working correctly - senders email overwritten with store email

Posted: Thu Mar 19, 2020 11:06 am
by sw!tch
jrunique wrote:
Thu Mar 19, 2020 10:21 am
Thank you for your fast reply. I changed that line of code, however it didn't seem fix the problem. :(
Clear your modification cache.

Ensure you implemented correctly - https://github.com/opencart/opencart/co ... 796ce30967

Re: Contact form not working correctly - senders email overwritten with store email

Posted: Thu Mar 19, 2020 11:16 am
by jrunique
I'm sorry, I forgot to clear vqmod/vqcache after clearing the modification cache. It is working okay now. Thanks everyone for your help.

Re: Contact form not working correctly - senders email overwritten with store email

Posted: Fri Mar 20, 2020 6:56 pm
by paulfeakins
jrunique wrote:
Thu Mar 19, 2020 11:16 am
I'm sorry, I forgot to clear vqmod/vqcache

Image
https://www.antropy.co.uk/blog/how-to-c ... t-3-0-2-0/