The PHP mail () function is not available in Windows and needs to be installed SendMail
1. Download Sendmail.zip from http://glob.com.au/sendmail/
2. Extract to C: Under, for example, C:\php\sendmail, the best short path, long path name may cause problems.
3. Modify PHP.ini as follows
Sendmail_path = "C:\wamp\sendmail\sendmail.exe-t"
4. Modify the Sendmail.ini according to your own configuration environment.
It is best to enable debug.log_file,error_logfile for the first time to see if SendMail is in effect.
5. Restart Apache
Use SendMail in conjunction with other SMTP servers, such as smtp.163.com, to send mail. Most mailboxes now require SMTP authentication, so add a user name and password to Sendmail.ini.
PHP.ini configuration (with 163 mailboxes as an example)
The code is as follows: [Mail function]
; For Win32 only.
SMTP = smtp.163.com
Smtp_port = 25
; For Win32 ...
Use SendMail in conjunction with other SMTP servers, such as smtp.163.com, to send mail. Most mailboxes now require SMTP authentication, so add a user name and password to Sendmail.ini.
PHP.ini configuration (with 163 mailboxes as an example)
The code is as follows: [Mail function]
; For Win32 only.
SMTP = smtp.163.com
Smtp_port = 25
; For Win32 only.
Sendmail_from = [email protected]
; For Unix only. Supply arguments as well (default: "Sendmail-t-i").
Sendmail_path = "D:\xampp\sendmail\sendmail.exe-t"
Configure three items, SMTP, Smtp_port, and Sendmail_path
Sendmail.ini Configuration
The code is as follows: [SendMail]
; Must change mail.mydomain.com to your SMTP server
Smtp_server=smtp.163.com
Smtp_port=25
Auth_username=yourusername
Auth_password=yourpassword
[Email protected]
SendMail Online There, if you are using XAMPP, where the face directly brought.
At the same time in the Conf of the virtual host add such a sentence
The code is as follows: Php_admin_value sendmail_path ' D:\xampp\sendmail\sendmail.exe-t [email protected] '
This email address is the user's e-mail address, just add it.