Jump to content

Recommended Posts

I have installed ssmtp on debian.

/etc/ssmtp/ssmtp.conf looks like this below:

root=ssmtpmailtesting@gmail.com
mailhub=smtp.gmail.com:587
#rewriteDomain=
hostname=mybox
UseSTARTTLS=YES
AuthUser=ssmtpmailtesting@gmail.com
AuthPass=[mypassword]
FromLineOverride=YES

php mail function:

$to      = 'shiblyldu60@yahoo.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\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

Edited by php-cola
Link to comment
https://forums.phpfreaks.com/topic/296634-php-mail-function-cant-send-email/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.