Configure the mail function provided by php

Source: Internet
Author: User
Before getting php, You need to record the screen, that is, use the e-mail function provided by php to send emails. Because you have not obtained the smtp server, password authentication is required for the smtp server provided on the Internet, however, php built-in functions do not provide identity authentication, which leads to the need to build a mail server that can send mails on your own computer!

Before getting php, You need to record the screen, that is, use the e-mail function provided by php to send emails. Because you have not obtained the smtp server, password authentication is required for the smtp server provided on the Internet, however, php built-in functions do not provide identity authentication, which leads to the need to build a mail server that can send mails on your own computer!

Before getting php, You need to record the screen, that is, use the e-mail function provided by php to send emails. Because you have not obtained the smtp server, password authentication is required for the smtp server provided on the Internet, however, php built-in functions do not provide identity authentication, which leads to the need to build a mail server that can send mails on your own computer!

Then, Baidu and google will continue to work, because they do not have an optical drive, and there will be noConfigurationThe smtp service provided by Microsoft can only be used to find the software for sending mails on the Internet. webmail was first used, but I don't know how.ConfigurationIn this regard, there are not many introductions on the Internet, so I gave up until I found an online buddy to share it.

============ Use winwebmail <strong> to configure </strong> mail () in php <strong> function </strong> () is a PHP built-in function that uses the SMTP service to send mail, the following is the prototype of this function [color = #007700] [/color] [code] mail (wvidc@qq.com, "No theme", $ message, "From: someone@cc5f.cn/nReply-To: reply@cc5f.cn/nX-Mailer: PHP /". phpversion (); [/code] after it is set, the test will report an error: [color = # ff0000] SMTP server response: 554 failed mail from verification with the FROM field in message header. [/color] The self-tested version is PHP5.x, need this to send successfully, should be the SMTP server problem, [code] mail (wvidc@qq.com, "No theme", $ message, phpversion ()); [/code] I found it online. php and winwebmail are rarely used together, and enterprise post offices cannot be used when php is used. My winwebmai version is 3.7.6.X, And the <strong> Configuration </strong> is still similar. Add the corresponding user and set it in the sending and receiving Rules tab :() [attach] 834 [/attach] fill in your own IP address in the SMTP verification IP exception. In this way, PHP can connect to the SMTP server without interfering with other webmail users. Php. ini settings: [code] [mail function]; For Win32 only. SMTP = 222. ***. **. * ** smtp_port = 25; For Win32 only. sendmail_from = mail@cc5f.cn; display_errors = Off; it is best to change to On when testing, Echo error [/code] PHP test code: [code] <? Php $ to = 'wvidc @ qq.com '; $ subject = 'subobject'; $ message = 'hello'; $ headers = phpversion (); if (mail ($, $ subject, $ message, $ headers) {echo "OK. ";} else {echo" Fail. ";}?> [/Code] [color = # ff0000] SMTP server response: 554 failed mail from verification with the FROM field in message header. [/color] in the case of winwebmail, you must disable the receiving and receiving rules: enable SMTP mail authentication <strong> function </strong>-> enable <strong> function </strong>-> disable [color = # ff0000] to enable mail imitation forgery <strong> function </strong> [/color] Page: [1] ==================================

I think winmail should be available, http://www.magicwinmail.com/download,

Then download, install,Configuration, Start testing!

ConfigurationYou canConfigurationNote that the Administrator's email address and sendmail_from in php. ini are correct.ConfigurationTo be the same! Before IConfigurationThe following error will be reported:

"Hi. this is the smtp delivery program. i'm afraid I wasn' t able to deliver your message to the following addresses. this is a permanent error; I 've given up. sorry it didn't work out. ========================================================== =============== hello! Your email cannot be delivered to the specified address. This is a permanent error, so you have to stop delivering."

Another note is that the default value of 25 on my smtp port is occupied. I changed it to 2525, And you can modify it in php. ini!

Another point is that some mailboxes do not receive emails from local machines (like foxmail), qq and 163, and they are generally in Spam!

Below isConfiguration

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.