PHP mail or pearmail (window/linux)

Source: Internet
Author: User
Tags glob
This article will introduce to you the mail or pearmail (windowlinux) sent by PHP. if you need to learn more, please refer to hayi and windowssendmailhttp:

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)

  1. [Mail function]
  2. ; For Win32 only.
  3. SMTP = smtp.airmb.com
  4. Smtp_port = 25
  5. ; For Win32 only.
  6. Sendmail_from = facai@airmb.com
  7. ; For Unix only. You may supply arguments as well (default: "sendmail-t-I ").
  8. Sendmail_path = "C:/PHP/sendmail/sendmail.exe-t"

Configure smtp, smtp_port, and sendmail_path.

Sendmail. ini configuration

  1. [Sendmail]
  2. ; You must change mail.mydomain.com to your smtp server
  3. Smtp_server = smtp.airmb.com
  4. Smtp_port = 25
  5. Auth_username = yourusername
  6. Auth_password = yourpassword
  7. Force_sender = facai@airmb.com
  8. ; 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.