Send email from localhost running XAMMP in PHP using GMAIL mail server

后端 未结 5 1728
[愿得一人]
[愿得一人] 2020-11-22 11:21

I try to send an email from localhost to my yahoo email account using php mail() function, the return says I successfully send the email but I did not get any email. I\'ve b

5条回答
  •  失恋的感觉
    2020-11-22 12:14

    in php.ini file,uncomment this one

    sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
    ;sendmail_path="C:\xampp\mailtodisk\mailtodisk.exe"
    

    and in sendmail.ini

    smtp_server=smtp.gmail.com
    smtp_port=465
    error_logfile=error.log
    debug_logfile=debug.log
    auth_username=your@gmail.com
    auth_password=yourpassword
    force_sender=your@gmail.com
    hostname=localhost
    

    configure this one..it will works...it working fine for me.

    thanks.

提交回复
热议问题