This article will introduce to you the mail or pearmail (windowlinux) sent by PHP. if you need to learn more, you can refer to hayi and windowssendmailglob .... this article will introduce you to PHP mail or pear mail (window/linux). For more information, see
I. windows sendmail
Http://glob.com.au/sendmail/
II. windows smtp server
Http://msdn.microsoft.com/zh-cn/library/8b83ac7t (v = vs.80). aspx
To solve the SMTP installation problem in WIN7, some people say that there is no SMTP service in WIN7. how can this problem be solved? the specific installation steps are as follows: control panel/Program> to enable and disable Windows, internet information service will be a world wide web service> Application Development function>.. NET extension.
The php mail () function is unavailable in windows.
The php mail () function is not available in windows. you need to install sendmail. Warning: mail () [function. mail]: "sendmail_from" not set in php. ini or custom "From:" header missing in
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:/PHP/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
Use sendmail with other smtp servers, such as smtp.airmb.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 (using airmb.com as an example)
[mail function] ; For Win32 only. SMTP = smtp.airmb.com smtp_port = 25 ; For Win32 only. sendmail_from = facai@airmb.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = "C:/PHP/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.airmb.com smtp_port=25 auth_username=yourusername auth_password=yourpassword force_sender=facai@airmb.com ; default_domain=mydomain.com
At the same time, add this sentence to the conf of the VM.
Php_admin_value sendmail_path 'C:/PHP/sendmail/sendmail.exe-t facai@airmb.com'
This email address is the user's email address.
Note,The test result is as follows: the message is sent successfully, indicating that it has been sent to the mail server queue! The email server is not started!
Run: service sendmail start
In addition, the sendmail server keeps saving emails that have been sent successfully! After the email server is started, all unsent emails will be sent.
Tutorial link:
Reprint at will ~ However, please keep the tutorial address★