Jump to content

No email received when making an order or modifying the status in back office


Recommended Posts

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

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

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

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

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

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!

post-26792-0-18240500-1372690128_thumb.jpg

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...