First you need to download the sendmail.zip file from http://glob.com.au/sendmail/, click here to download it, and extract it to the D:/php/sendmail/directory.
Then open the php.ini file and find the following code
The code is as follows
[mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 Only. ;sendmail_from = [email protected] ; For Unix only. You may 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 will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters =
By default, this machine is used as a mail server. Here we need to borrow sendmail to send mail, use sendmail to configure it to send it with qq, 163 mailbox (usually in this way) so we need to put all the options. Log out, put SMTP = localhost and smtp_port = 25 in front of ";" and then delete the "" in front of sendmai_path="" to sendmai_path="d:/php/sendmail /sendmail.exe -t" After the change, the
code is as follows
[mail function] ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example. For Unix only. You may 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 will 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 be turned on. Sendmail_path can be, then save
Then modify the sendmail.ini file in the sendmail directory, the main content is the following
Code is as follows
smtp_server=smtp server address (eg smtp.ym.163.com) auth_username=mailbox login name (eg [email protected]) auth_password=mailbox password (eg xxxxxx) force_sender=sender address is written (eg [email protected])
There is another
code as follows
; auto = use SSL for port 465, otherwise try to use TLS
Remove the previous ";", that is, enable the SSL secure login option.
The above four items are correct. Fill in the changes and save, then restart IIS to use normally, now I am happy to test my wordpress blog
Now start debugging WordPress blog, but found that the server can not send mail, sendmail has been installed, but continue to prompt The mail was not sent successfully. Analysis for a long time, finally found the reason
Step 1: Install the sendmail service Download sendmail.RAR to the sendmail directory under the php directory
Step 2, configure the php.ini file
Code is as follows
sendmail_path =”D:/php/sendmail/sendmail.exe -t”
The drive letter and location are determined by the location of the sendmail.exe file
The third step, configure sendemail.ini
The code is as follows
smtp_server=smtp.sina.com.cn smtp_port=25 These two are the account when authentication is required, password auth_username= Ifbs auth_password=XXXX
The fourth step is to give cmd.exe permission. The C:/WINDOWS/system32/cmd.exe file has the read permission of users. The following error will occur if you do not grant permission. Warning: mail() [function.mail]: Could not execute mail delivery program
Step 5: Create a mail.php file test result
Code is as follows
< ?php $mail = “[email protected]”; $subject = “Mail Test”; $text = “This is a test mail for function mail()”;
if (mail($mail,$subject,$text)){ echo “email send success!”; }else{ echo “email send fail!”; } ?>
Visit mail. Php can test the results
More reference to solve the tutorial "iis php mail function sendmail configuration method"
A disk array is a system in which a number of hard disk drives are grouped togeth
Todays cost savings have become a problem that companies must face. However, there
As you can see from the prompts, this upgrade will result in the inability to restore the domain to
How to add PHP support for IIS7 in Vista /Windows Server 2008 At present, many websites are written
Send mail configuration method of php mail function under iis
Three steps to port the DHCP server database
Defined duplicate system.web.extensions/scripting/scriptResourceHandler
Two major problems that lead to low cooling efficiency in the engine room
Preventing database files from being downloaded by safely configuring IIS
Achieve Win2000 patch quick installation
Linux server: About the invisible occupation of disk space under linux
407 Proxy Authentication Required Error Solution
How to remotely connect to the Linux system desktop via VNC
Teach you how to quickly solve the problem of Win8 not online
Watch live TV with a desktop computer?
The first intimate contact with the Windows service
Tip: Windows 8 system compared with Win 7, what is more