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

The solution to the failure of sending phpcms Mail

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces phpcms mail failure to send solutions, with a certain reference value, friends can refer to the need. I hope you all have a lot to gain after reading this article. Let's take a look at it together.

What if phpcms fails to send mail?

Reasons for phpcms mail failure:

1: The best thing is to use the enterprise mailbox,(I don't know why it doesn't succeed with ordinary use)

2: If the local test is successful, the test on the server fails, probably because the server configuration disables the fsockopen function.

Check phpinfo to see if disable_functions has fsockopen, and if so, that's the problem.

Solution:

Open: phpcms\modules\member\classes\client.class.php,

78 lines: if(!$) fp = fsockopen($mail['server'], $mail['port'], $errno, $errstr, 30)) {

Change to: if(!$ fp = pfsockopen($mail['server'], $mail['port'], $errno, $errstr, 30)) {

Change fsockopen to pfsockopen.

PS: Some host vendors disable the fsockopen function function to prevent hackers from using fsockopen for PHPDDOS attacks after program vulnerability injection.

The fsockopen function differs from the pfsockopen function in that pfsockopen remains keep-alive, making it impossible for hackers to carry out connection count attacks.

Thank you for reading this article carefully, I hope Xiaobian share phpcms email failed to send the solution content to help everyone, but also hope that everyone more support, pay attention to the industry information channel, encounter problems to find, detailed solutions waiting for you to learn!

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