Jump to content

PHP mail function is not working


Recommended Posts

Hi,

 

The last week my email on prestashop works fine. This week my customer can not receive any email, no matter placing an order, the status has been changed, etc. I have tried changing to SMTP (Gmail) instead of PHP and works fine. I would no like to use SMTP because when I sent a newsletter Gmail blocks me.

 

Do you know why it is happens?

 

I am using Ipage hosting and Prestashop 1.5.0.17.

 

I was wondering if Ipage blocks me because of the newsletter I sent on the weekend.

 

Fernando

Link to comment
Share on other sites

maybe the same reasons for why google blocked you?

maybe your email is listed as SPAM mail ?

have you got an access to outgoing emails log?

I have checked with Ipage and I am not blocked. I have checked my emails and there are not in SPAM, they didnt reach the destination email. Where can I access my outgoing emails log of the php function?

 

Thanks :D

Link to comment
Share on other sites

I have done this changes and it is not working also:

 

Once in the root folder, you will need to make three code changes in three files. The first is located in the /tools/swift/Swift/Plugin/MailSend.php at around line 158.
Change
$headers = $headers->build();
To 
$headers = $headers->build();
$params = "";
 
Next, navigate to the /tools/swift/Swift/Message.php file to around line 79. 
Change 
$this->setFrom("");
To
$this->setFrom("[email protected]");
 
Finally, navigate and change the /tools/swift/Swift.php file at around line 370. 
Change 
if (!($has_reply_to = $message->getReplyTo())) $message->setReplyTo($from);
To
if (!($has_reply_to = $message->getReplyTo())) $message->setReplyTo($from);
if (!$has_reply_to[0]) $message->setReplyTo($from->getAddress());
Link to comment
Share on other sites

in my opinion it's strictly related to host settings.

try to create simple .php file with code

<?PHP 
mail('[email protected]', 'Test', 'message content test');
?>

does it work?

I am newbie, how can I create it and check i?

 

What I have note is that the test email in prestashop works but the email templates like confirmation, status changes, etc. and newsletter does not work on php.

Edited by kenkomuri (see edit history)
Link to comment
Share on other sites

  • 1 year later...
  • 7 months later...

1st give the correct path of [sendmail_path] function in php.ini then simply disable  [disable_functions] in php.ini.  or just add disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,phpinfo,system,exec,

 

====================

 

in vps if u r using smtp clients as SSMTP then add in php.ini, sendmail_path = /usr/sbin/ssmtp -t 

and disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,phpinfo,system,exec,

Link to comment
Share on other sites

×
×
  • Create New...