Jump to content

prestashop v1.6 can't send mail( fixed )


Recommended Posts

After i installed my site, and installed also sendmail, but my site can't send mail by mail() function.

i can send email by commend :

mail -s "test" [email protected]  < test.log ( you need to create test.log file first)

 

it works well, But prestashop admin page, it always show:

 

Error: Please check your configuration
Sending failed using mail() as PHP's default mail() function returned boolean FALSE.

 

i am very crazy!!!, after searched many many forums, i found those :

 

1. edit php.ini file.

 

vi  /usr/local/php/etc/php.ini

 

add this line:

 

sendmail_path = /usr/sbin/sendmail -t -i -f  [email protected]

 

2.

 
In /tools/swift/Swift/Message.php line #79
Change
$this->setFrom("");
To
$this->setFrom("[email protected]");
 
In /tools/swift/Swift.php after line 370
if (!($has_reply_to = $message->getReplyTo())) $message->setReplyTo($from);
Add the following code:
if (!$has_reply_to[0]) $message->setReplyTo($from->getAddress());
 
In /tools/swift/Swift/Plugin/MailSend.php line # 159
Add
$params = "";
-------------------------------------------
 
You need to do all this, OR you can't use " Use PHP's mail() function (recommended; works in most cases)"
 
good luck for you!

 

 

 

 

Link to comment
Share on other sites

  • 7 months later...

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...