0
這是我通過xampp發送郵件的代碼,我修改了xampp中的php.ini和sendmail.ini。運行php後,我沒有收到電子郵件。請幫幫我 。如何修改xampp使用php發送郵件?
的php.ini
[mail function]
SMTP =smtp.gmail.com <br>
smtp_port =587
; For Win32 only.
;sendmail_from [email protected]
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"
sendmail.ini
smtp_server=smtp.gmail.com
; smtp port (normally 25)
smtp_port=587
[email protected] <br>
auth_password=password <br>
[email protected]
用於發送電子郵件的PHP代碼是這樣的
mail("[email protected]","subject","this is the mail","From: [email protected]");
這是我的PHP代碼。告訴我錯誤?
告訴我們錯誤。你有沒有收到?你檢查了錯誤日誌嗎? –
可能重複的[如何配置XAMPP從本地主機發送郵件?](http://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost) –
是的它是同一個問題的重複。我跟着它,但仍然無法發送郵件 –