Your Mail Parameters setting is wrong. Try clearing it or set the correct parameters for your hosting.
You get the error message as your hosting is set to remove any email addresses in the Mail Parameters from the To field on any outgoing emails. Leaving it with no address to send to.
If deleting the value in Mail Parameters and then saving didn't work (Mail Parameters should be blank). Try adding -f to the front of the email address you want to use, giving.
Or you could set Mail Engine to SMTP and ensure all the SMTP settings are correct.
Code: Select all
-fstore@mydomainname.com
You are brilliant! solved. thank you!ADD Creative wrote: ↑Sat Sep 22, 2018 5:58 amIf deleting the value in Mail Parameters and then saving didn't work (Mail Parameters should be blank). Try adding -f to the front of the email address you want to use, giving.Or you could set Mail Engine to SMTP and ensure all the SMTP settings are correct.Code: Select all
-fstore@mydomainname.com
I case anyone else has the problem, what solved it? Adding the -f or switching to SMTP?
I modified the mail message to include the customers name and email.
I used ftp and text editor.
Open yourdomain/ocart2/catalog/controller/information/contact.php
Find the section of code below and enter the new $mail->setText line
I used ftp and text editor.
Open yourdomain/ocart2/catalog/controller/information/contact.php
Find the section of code below and enter the new $mail->setText line
Code: Select all
$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->config->get('config_email'));
$mail->setReplyTo($this->request->post['email']);
$mail->setSender(html_entity_decode($this->request->post['name'], ENT_QUOTES, 'UTF-8'));
$mail->setSubject(html_entity_decode(sprintf($this->language->get('email_subject'), $this->request->post['name']), ENT_QUOTES, 'UTF-8'));
//Comment out the original line so its not lost $mail->setText($this->request->post['enquiry']);
$mail->setText("Customers Name: ".$this->request->post['name']."\n"."Customers Email: ".$this->request->post['email']."\n"."Message:\n".$this->request->post['enquiry']);
$mail->send();
Thank you xxvirusxx for pointing me in the right direction:
From (in my version on line 24):
To:
-That works for me at www.skrueteknik.dk
However, I prefer to have the customer's name and e-mail address in the e-mail body instead, so I changed the following line in the above mentioned file:xxvirusxx wrote: ↑Tue Apr 17, 2018 3:18 pmLE. To show customer email addres in "From" you need to edit:Code: Select all
catalog/controller/information/contact.php
From (in my version on line 24):
Code: Select all
$mail->setText($this->request->post['enquiry']);
Code: Select all
$mail->setText($this->request->post['enquiry']."\n\rEmail:".$this->request->post['email']."\n\rName:".$this->request->post['name']);
Who is online
Users browsing this forum: No registered users and 397 guests