Pixefora D Posted April 16, 2018 Share Posted April 16, 2018 I have a problem with my prestashop store, which has been going on for about 1 month: When a customer places an order, or when using the contact form, or when trying to forward an order to a customer, the mail never arrives: "An error occurred while sending e-mail to the customer." But this only happens SOMETIMES. It may happen that during 3 days everything goes well, and in the room for 5 hours send 1 mail out of every 100. I have consulted the administrators of the server and they tell me that the SMTP service is going well . I have also verified that if I change to the php mailer function, everything works perfectly. Has something similar happened to someone? Any ideas. Prestahop version 1.6.1.18 Link to comment Share on other sites More sharing options...
Eqa Almutairi Posted April 19, 2018 Share Posted April 19, 2018 for contact form is to locate problem. edit /modules/contactform/contactform.php crtl +f - find function sendMessage and go down where it say An error... i think line 418. $this->context->controller->errors[] = $this->trans('An error occurred while sending the message, please try again.', array(), 'Modules.Contactform.Shop'); replace to be like this $this->context->controller->errors[] = $errorMessage = error_get_last()['message']; this way make it easy for you locate problem for contact us form. which i think lang/directory problem.! as for smtp. is too easy if look at maillog to see problem in real time . so is 90% server problem. wish this help little. Link to comment Share on other sites More sharing options...
Pixefora D Posted May 11, 2018 Author Share Posted May 11, 2018 (edited) Thx to answer. Finally the problem was spam: *DEBUG* 2018/04/27 - 11:30:03: ERROR Expected response code 250 but got code "550", with message "550 5.2.0 BzhWf26a9mCYa Spam Rejected I get this message i edited classes/Mail.php and aboute line 405, after catch (Swift_SwiftException $e) { PrestaShopLogger::addLog( 'Swift Error: '.$e->getMessage(), 3, null, 'Swift_Message' ); Add this code: $logger = new FileLogger(0); //0 == nivel de debug. Sin esto logDebug() no funciona. $logger->setFilename(_PS_ROOT_DIR_."/log/debug.log"); $logger->logDebug("ERROR ".$e->getMessage()); Then, when the mail send get error, you can get the message code in log/debug.log. I send this message to server administrator, and in one day was resolved Edited May 11, 2018 by kurungele Forget information (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now