I try to install on a server a msmtp whiwh work with Gmail SMTP.
My .msmtprc file :
defaults
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
account default
host smtp.gmail.com
port 587
auth on
user thetranslationtrustee@linguacustodia.com
password XXXXXX
from thetranslationtrustee@linguacustodia.com
logfile /var/log/msmtp.log
My php.ini file have this line :
sendmail_path = /usr/bin/msmtp -C /root/.msmtprc -t
the command :
msmtp arnaud.gicquel@linguacustodia.com
test
test
test
test
work perfectly and send a mail
but
>cat test_mail.php
<?php
if ( mail ( 'arnaud.gicquel@linguacustodia.com', 'Test mail from localhost', 'Working Fine.' ) ){
echo 'Mail sent ';
}
else{
echo 'Error. Please check error log.';
}
?>
>php test_mail.php
Mail sent
seems to work but i never receive the mail
Anyone can help me to configure Msmtp to use Gmail as SMTP relay please