Post by ziatakis » Mon Oct 10, 2022 9:46 pm

OC 3.0.3.1
Contact Form not sending email, although i see the success page

emails received when there is:
-new client
-new order
-reseting clients password
-sending marketing email from backend

email is configured with smtp
there are no errors on error.log

code on information/contact.php :


if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
$mail = new Mail($this->config->get('config_mail_engine'));
$mail->parameter = $this->config->get('config_mail_parameter');
$mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');
$mail->smtp_username = $this->config->get('config_mail_smtp_username');
$mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');
$mail->smtp_port = $this->config->get('config_mail_smtp_port');
$mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');

$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'));
$mail->setText($this->request->post['enquiry']);
$mail->send();

$this->response->redirect($this->url->link('information/contact/success'));
}

New member

Posts

Joined
Mon Oct 09, 2017 11:29 pm

Post by ADD Creative » Mon Oct 10, 2022 10:10 pm

Check your PHP error log as well as the OpenCart one. You could also check your mail server logs if you have access to them.

www.add-creative.co.uk


Guru Member

Posts

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

Post by paulfeakins » Tue Oct 11, 2022 9:34 pm

Have you checked the sent mail of the sending SMTP account?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 21 guests