Sending email from localhost server xampp/sendmail

后端 未结 1 887
忘了有多久
忘了有多久 2020-12-11 11:19

I have set up a PHP site that will be locally hosted. One function of this is to send an email with items from a shopping cart. When hosted online (for testing) the email()

相关标签:
1条回答
  • 2020-12-11 12:05

    Try this

    sendmail.ini

    [sendmail]

    smtp_server=smtp.gmail.com
    smtp_port=465
    smtp_ssl=ssl
    error_logfile=error.log
    debug_logfile=debug.log
    auth_username=[email]@gmail.com
    auth_password=[email password]
    pop3_server=
    pop3_username=
    pop3_password=
    force_sender=[email]@gmail.com
    force_recipient=
    hostname=smtp.gmail.com
    

    php.ini

    [mail function]

    SMTP = smtp.gmail.com
    smtp_port = 465
    sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
    mail.add_x_header=Off
    
    0 讨论(0)
提交回复
热议问题