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

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

Then open the php.ini file and find the code below
Copy CodeThe code is as follows:
[Mail Function]
; For Win32 only.
SMTP = localhost
Smtp_port = 25
; For Win32 only.
; sendmail_from = me@example.com
; For Unix only. Supply arguments as well (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, as a mail server, here we need to borrow sendmail to send mail, using SendMail to configure such as QQ, 163 of the mailbox to send (generally in this way) so we need to write all the options, that is, the SMTP = localhost and smtp_port = 25 preceded by ";" Then put sendmai_path= "" in front of ";" Delete, instead of sendmai_path= "D:\php\sendmail\sendmail.exe-t", after the change is
Copy CodeThe code is as follows:
[Mail Function]
; For Win32 only.
; SMTP = localhost
; smtp_port = 25
; For Win32 only.
; sendmail_from = me@example.com
; For Unix only. Supply arguments as well (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 only the Sendmail_path can be turned on and then saved

Then modify the SendMail directory of the Sendmail.ini file, the main content has the following items
Copy CodeThe code is as follows:
SMTP_SERVER=SMTP server address (e.g. smtp.ym.163.com)
Auth_username= Mailbox Login name (e.g. info@xxxx.com)
auth_password= email password (e.g. xxxxxx)
force_sender= Sender address full write (e.g. info@xxxx.com)

There is also an additional
Copy CodeThe code is as follows:
; Auto = use SSL for port 465, otherwise try-to-use TLS

Put the front ";" Remove, the SSL secure login option is enabled

The above four items are correctly filled in after the modification is complete and saved, then restart IIS for normal use.

If the message cannot be sent, check if the lower port is blocked, if McAfee has set a prohibit email, etc.

http://www.bkjia.com/PHPjc/325318.html www.bkjia.com true http://www.bkjia.com/PHPjc/325318.html techarticle first you need to go to download the Sendmail.zip file from http://glob.com.au/sendmail/, click here to download it directly, then unzip it into the D:\php\sendmail\ directory as well. Then open the php.ini text ...

  • Related Article

    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.