Warning: Mail () [function. Mail]: SMTP Server Response: 530 5.7.0 must issue a starttls command first
The PHP mail () function is not available in windows. You need to install Sendmail.
1. Download sendmail.zip from http://glob.com.au/sendmail/
2. decompress the package to C:, for example, C: \ PHP \ sendmail. It is best to use a short path and a long path name may cause problems.
3. Modify PHP. ini as follows:
Sendmail_path = "C: \ Wamp \ Sendmail \ sendmail.exe-t"
4. Modify sendmail. ini according to your configuration environment.
It is best to enable Debug. LOG_FILE and error_logfile for the first time to check whether Sendmail takes effect.
5. Restart Apache to use sendmail with other SMTP servers, such as smtp.163.com, to send emails. Currently, most mailboxes require SMTP authentication. Therefore, you must add the user name and password to sendmail. ini.
PHP. ini configuration (take the 163 mailbox as an example)
[Mail function]
; For Win32 only.
SMTP = smtp.163.com
Smtp_port = 25
; For Win32 ......
Use sendmail with other SMTP servers, such as smtp.163.com, to send emails. Currently, most mailboxes require SMTP authentication. Therefore, you must add the user name and password to sendmail. ini.
PHP. ini configuration (take the 163 mailbox as an example)
[Mail function]
; For Win32 only.
SMTP = smtp.163.com
Smtp_port = 25
; For Win32 only.
Sendmail_from = 4u4v@163.com
; For Unix only. You may supply arguments as well (default: "sendmail-t-I ").
Sendmail_path = "D: \ XAMPP \ Sendmail \ sendmail.exe-t"
Configure SMTP, smtp_port, and sendmail_path.
Sendmail. ini configuration
[Sendmail]
; You must change mail.mydomain.com to your SMTP Server
Smtp_server = smtp.163.com
Smtp_port = 25
Auth_username = yourusername
Auth_password = yourpassword
Force_sender = yourusername@163.com
Sendmail is available online. If you use XAMPP, it will be included directly.
At the same time, add this sentence to the conf of the VM.
Php_admin_value sendmail_path 'd: \ XAMPP \ Sendmail \ sendmail.exe-T 4u4v@163.com'
This email address is the user's email address.
Http://s.yanghao.org/program/viewdetail.php? I = 39709.