Cabb Posted February 7, 2014 Share Posted February 7, 2014 (edited) 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 February 7, 2014 by Cabb (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted February 8, 2014 Share Posted February 8, 2014 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 More sharing options...
Cabb Posted February 8, 2014 Author Share Posted February 8, 2014 Thanks for your reply! Do you perhaps know how I should edit this line? I tried to comment out but then the contact form page gets blank. Thanks again. Link to comment Share on other sites More sharing options...
Cabb Posted February 8, 2014 Author Share Posted February 8, 2014 I've found it! I've forgot to add the closing bracket Link to comment Share on other sites More sharing options...
aliaspt Posted April 21, 2015 Share Posted April 21, 2015 Could somebody please clarify which line needs to be deleted in order to stop this message from being sent? Link to comment Share on other sites More sharing options...
Recommended Posts