Jump to content

Disable "your message correctly sent" to customers from contact form


Recommended Posts

Hi!

Each time a customer contacts us by using the contact form, he/she will receive a mail with "your message has been correctly sent".

 

I want to turn this off. How can you do this?

 

I could not find a setting in the back-end so I assume I have change this in the code.

 

In controller/front/contactcontroller.php there are some lines using Mail send.

 

===

 

else
$subject = Mail::l('Your message has been correctly sent');
 
if ($id_order)
{
$order = new Order((int)$id_order);
$var_list['{order_name}'] = $order->getUniqReference();
$var_list['{id_order}'] = $id_order;
}
 
if (empty($contact->email))
Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, null, null, $fileAttachment);
else
{
if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' ',
$var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''),
$fileAttachment) ||
!Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, $contact->email, $contact->name, $fileAttachment))
$this->errors[] = Tools::displayError('An error occurred while sending the message.');
}
}
 
===
 
How and what should I edit?
 
Thank you!
Edited by Cabb (see edit history)
Link to comment
Share on other sites

In that file, the second one in the else statement

					else
					{					
						if (!Mail::Send($this->context->language->id, 'contact', Mail::l('Message from contact form').' [no_sync]',
							$var_list, $contact->email, $contact->name, $from, ($customer->id ? $customer->firstname.' '.$customer->lastname : ''),
									$fileAttachment) ||
								!Mail::Send($this->context->language->id, 'contact_form', $subject, $var_list, $from, null, $contact->email, $contact->name, $fileAttachment))
									$this->errors[] = Tools::displayError('An error occurred while sending the message.');
					}
Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...