I'm using OpenShift and I have problem sending email.
It works fine when logged in via ssh, for eg:
echo “Test from Postfix” | mail -s “Test1″ me@yahoo.com
However if I want to send an email from php code like this:
if (mail ('me@yahoo.com', "Test Postfix", "Test mail from postfix", "From: somebody@example.com"))
echo "mail sent succesfully";
else
echo "couldn't send mail";
It writes "mail sent succesfully", but no email arrives :( Tried without header too, but it's the same.
Checked the settings for smtp, sendmail_path, sendmail_from and smtp_port, both with php -i
and phpinfo()
. They are the same:
- smtp_port=25
- sendmail_path=(the path that I get with which sendmail)
- smtp=localhost (also tried with ini_set("SMTP", "smtp.mysmtp.com")).
error.log contains no error. I can't find the email.logs.
Can you suggest some solution?