colap Posted June 4, 2015 Share Posted June 4, 2015 I have installed ssmtp on debian. /etc/ssmtp/ssmtp.conf looks like this below: [email protected] mailhub=smtp.gmail.com:587 #rewriteDomain= hostname=mybox UseSTARTTLS=YES [email protected] AuthPass=[mypassword] FromLineOverride=YES php mail function: $to = '[email protected]'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); From apache error.log i get this message: sendmail: Authorization failed (534 5.7.14 https://support.google.com/mail/answer/78754 nz12sm1965155pdb.49 - gsmtp Which software is used to send mail with php for debian and windows? 1)sendmail 2)ssmtp 3)msmtp Link to comment https://forums.phpfreaks.com/topic/296634-php-mail-function-cant-send-email/ Share on other sites More sharing options...
blacknight Posted June 4, 2015 Share Posted June 4, 2015 sendmail is the default daemon for php on windows and unix based systems i recomend using it... Link to comment https://forums.phpfreaks.com/topic/296634-php-mail-function-cant-send-email/#findComment-1513137 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.