SendMail configuration method for PHP mail functions under IIS (official recommendation) _php Tips

Source: Internet
Author: User
Tags win32
First you need to go to download the Sendmail.zip file from http://glob.com.au/sendmail/, click here to download it directly Oh, then unzip it to the D:\php\sendmail\ directory.

Then open the php.ini file and find the following code
Copy Code code as follows:

[Mail Function]
; For Win32.
SMTP = localhost
Smtp_port = 25
; For Win32.
; sendmail_from = me@example.com
; For Unix only. You may supply arguments as OK (default: "Sendmail-t-i").
; Sendmail_path = ""
; Force The addition of the specified parameters to be passed as extra parameters
; to the SendMail binary. These parameters would always replace the value of
; The 5th parameter to mail (), even in safe mode.
; mail.force_extra_parameters =

By default, this is done as a mail server, where we need to borrow sendmail to send mail, with SendMail to configure such as QQ, 163 of the mailbox to send (generally in this way) so we need to put all the options are off, that is, the SMTP = localhost and smtp_port = 25 front plus ";" Then put the sendmai_path= "" in front of the ";" deleted, changed to Sendmai_path= "D:\php\sendmail\sendmail.exe-t", after the change is
Copy Code code as follows:

[Mail Function]
; For Win32.
; SMTP = localhost
; smtp_port = 25
; For Win32.
; sendmail_from = me@example.com
; For Unix only. You may supply arguments as OK (default: "Sendmail-t-i").
Sendmail_path = "D:\php\sendmail\sendmail.exe-t"
; Force The addition of the specified parameters to be passed as extra parameters
; to the SendMail binary. These parameters would always replace the value of
; The 5th parameter to mail (), even in safe mode.
; mail.force_extra_parameters =

Note that the above only needs to open Sendmail_path, and then save

Then modify the SendMail directory of the Sendmail.ini file, mainly filled with the following items
Copy Code code as follows:

SMTP_SERVER=SMTP server address (e.g. smtp.ym.163.com)
Auth_username= Mailbox Login name (such as info@xxxx.com)
Auth_password= mailbox password (such as XXXXXX)
Force_sender= Sender address complete (e.g. info@xxxx.com)

There is also another
Copy Code code as follows:

; Auto = use SSL for port 465, otherwise try to use TLS

Put the front of the ";" Delete, the SSL secure login option is turned on

The above four correct fill in the correction after the completion of the save, and then restart IIS to normal use.

If you can't send a message, check if the lower port is blocked, McAfee is not set up to prohibit the sending of mail, etc.

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.