prmag Posted June 30, 2013 Share Posted June 30, 2013 No email received when making an order or modifying the status of an order in back office I got this message. Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/46/10800346/html/coquieloriginal/tools/swift/Swift/Plugin/MailSend.php on line 160 Warning: Cannot modify header information - headers already sent by (output started at /home/content/46/10800346/html/coquieloriginal/tools/swift/Swift/Plugin/MailSend.php:160) in /home/content/46/10800346/html/coquieloriginal/classes/Tools.php on line 141 I am receiving email fine when I test the email on advance parameter. Spam folder is not collecting them. Any ideas? Link to comment Share on other sites More sharing options...
NemoPS Posted July 1, 2013 Share Posted July 1, 2013 Hard to tell which parameter is corrupted. Try going to classes and open orderHistory.php, locate the addWithEmail method and look for Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'], null, null, null, null, _PS_MAIL_DIR_, false, (int)$order->id_shop); See the second last parameter? change it to true. It should give you more info Link to comment Share on other sites More sharing options...
prmag Posted July 1, 2013 Author Share Posted July 1, 2013 Hi, Thanks fo the reply. I did the changes in classes/order/OrderHistory.php and nothing happen. This is the changed text; Mail::Send((int)$order->id_lang, $result['template'], $topic, $data, $result['email'], $result['firstname'].' '.$result['lastname'], null, null, null, null, _PS_MAIL_DIR_, true, (int)$order->id_shop); Any other idea? Error I am getting: Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/46/10800346/html/coquieloriginal/tools/swift/Swift/Plugin/MailSend.php on line 160 Warning: Cannot modify header information - headers already sent by (output started at /home/content/46/10800346/html/coquieloriginal/tools/swift/Swift/Plugin/MailSend.php:160) in/home/content/46/10800346/html/coquieloriginal/classes/Tools.php on line 141 Link to comment Share on other sites More sharing options...
prmag Posted July 1, 2013 Author Share Posted July 1, 2013 This is line 160 of MailSend.php file if (!ini_get("safe_mode")) $success = mail($to, $subject, $message, $headers, $params); This is line 141 on Tools.php file header('Location: '.$url); Link to comment Share on other sites More sharing options...
NemoPS Posted July 1, 2013 Share Posted July 1, 2013 Clueless Link to comment Share on other sites More sharing options...
prmag Posted July 1, 2013 Author Share Posted July 1, 2013 Who can assist me with this issue then? Link to comment Share on other sites More sharing options...
NemoPS Posted July 1, 2013 Share Posted July 1, 2013 Try this: before that script dies, print out (var_dump($parameter)) all the values passed to mail() and let us know Link to comment Share on other sites More sharing options...
prmag Posted July 1, 2013 Author Share Posted July 1, 2013 I don't understand your instructions? Sorry :-( Link to comment Share on other sites More sharing options...
NemoPS Posted July 1, 2013 Share Posted July 1, 2013 Edit mailSend.php Before if (!ini_get("safe_mode")) $success = mail($to, $subject, $message, $headers, $params); Add var_dump($to) var_dump($subject) var_dump($message) var_dump($headers) var_dump($params) Link to comment Share on other sites More sharing options...
prmag Posted July 1, 2013 Author Share Posted July 1, 2013 Now I am getting this: Parse error: syntax error, unexpected T_STRING in /home/content/46/10800346/html/coquieloriginal/tools/swift/Swift/Plugin/MailSend.php on line 161 This is a screenshot of the MailSend.php Thanks! Link to comment Share on other sites More sharing options...
NemoPS Posted July 1, 2013 Share Posted July 1, 2013 Well you should add semicolons at the end of each line 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