How PHP configures SendMail under Windows and sends mail via the mail () function

Source: Internet
Author: User
Tags configuration php
This article mainly introduces the PHP implementation in Windows configuration SendMail and through the Mail () function to send mail, a more detailed analysis of the Windows platform SendMail configuration steps and the corresponding use of skills, the need for friends can refer to the following

1, the PHP Mail () function is not available in Windows, you need to install SendMail.

2. Download SendMail components from http://glob.com.au/sendmail/

3, decompression sendmail.zip to the directory, I installed the path is: F:\root\sendMail

4, configuration php.ini, the main configuration of the following 3 items

5, modify Sendmail.ini, file path: F:\root\sendMail\sendmail.ini

smtp_server=smtp.qq.comsmtp_port=25auth_username=yourusernameauth_password=yourpasswordforce_sender=******@ Qq.com

6. Test Send mail

<?phpif (Mail ("test@test.com", "Test", "test message") {echo "Success";} else {  echo "fail";}

Related recommendations:

Phpstudy using your own sendmail extension to send messages

Sendai SendMail configuration method for PHP mail functions under IIS official recommendation

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

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.