Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that php.ini mail is configured correctly but does not send mail under windows system

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to solve the problem that php.ini email is configured correctly but does not send email under the windows system". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. please follow the editor's train of thought to slowly deepen, together to study and learn "how to solve the problem of php.ini email configuration correctly but not sending email under the windows system"!

Warning: mail () [function.mail]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first

The php mail () function is not available in windows. You need to install sendmail.

1. Download sendmail.zip from http://glob.com.au/sendmail/

two。 Extract to C:, such as C:\ php\ sendmail, it is best to have a short path, and a long path name may cause problems.

3. Modify the php.ini as follows

Sendmail_path = "C:\ wamp\ sendmail\ sendmail.exe-t"

4. Modify sendmail.ini according to your own configuration environment.

It is best to enable debug.log_file,error_logfile for the first time to see if sendmail is in effect.

5. Restart apache

Use sendmail combined with other smtp servers, such as smtp.163.com, to send mail. Most mailboxes now require smtp authentication, so add a user name and password to sendmail.ini.

Php.ini configuration (take 163mailbox as an example)

The code is as follows:

[mail function]

; For Win32 only.

SMTP = smtp.163.com

Smtp_port = 25

; For Win32.

Use sendmail combined with other smtp servers, such as smtp.163.com, to send mail. Most mailboxes now require smtp authentication, so add a user name and password to sendmail.ini.

Php.ini configuration (take 163mailbox as an example)

The code is as follows:

[mail function]

; For Win32 only.

SMTP = smtp.163.com

Smtp_port = 25

; For Win32 only.

Sendmail_from = 4u4v@163.com

; For Unix only. You may supply arguments as well (default: "sendmail-t-I").

Sendmail_path = "D:\ xampp\ sendmail\ sendmail.exe-t"

Just configure three items, smtp, smtp_port and sendmail_path

Sendmail.ini configuration

The code is as follows:

[sendmail]

; you must change mail.mydomain.com to your smtp server

Smtp_server=smtp.163.com

Smtp_port=25

Auth_username=yourusername

Auth_password=yourpassword

Force_sender=yourusername@163.com

Sendmail has it on the Internet, if you are using xampp, you can bring it directly inside.

At the same time, add this sentence to the conf of the virtual host.

The code is as follows:

Php_admin_value sendmail_path 'D:\ xampp\ sendmail\ sendmail.exe-t 4u4vmist163.com'

This email address is the user's email address, please feel free to add it.

Thank you for your reading, the above is the content of "how to solve the problem of correct configuration of php.ini mail without sending mail under the windows system". After the study of this article, I believe you have a deeper understanding of how to solve the problem of correct configuration of php.ini mail but not sending mail under the windows system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report