I isntalled successfull ssmtp:
/etc/ssmtp/ssmtp.conf
root=contact@mydomain.com
www-data=contact@mydomain.com
mailhub=ssl0.ovh.net:587
#mailhub=ns0.ovh.net:587
UseSTARTTLS=YES
FromLineOverride=YES
AuthUser=contact@mydomain.com
AuthPass=********
And trying it with:
echo content | mail -s "subject" myemail@gmail.com
This works and I do receive email
my ssmpt seems also ok:
ls -la /usr/sbin/sendmail
lrwxrwxrwx 1 root root 5 Jul 15 2014 /usr/sbin/sendmail -> ssmtp
my php.ini has:
sendmail_path = "/usr/sbin/sendmail -t -i"
However, when I try to send email through the mail() function: I receive FALSE
tail /var/log/apache2/error.log
gives me: sendmail: Cannot open mailhub:25
Any idea ?