Discuz x3.2 setting registered email activation_enterprise mail failed to send email

Source: Internet
Author: User

In the discuz x2.5 mailbox settings, I have already mentioned a lot of Solutions to mail settings and common problems. Today I will mainly describe discuz! Troubleshooting of failed email sending is applicable to the discuz program in any section.

Discuz! Troubleshooting for failed email sending:

1. Check whether the entered email information is correct.

2. view the mail log file. There is a file like 201210_smtp.php under the Data/log directory. The following is an example.

Example 1:

  1. <? PHP exit;?> 2012-10-17 16:59:59 127.0.0.1 1/admin. php? Action = checktools & Operation = mailcheck & frame = No (smtp.qq.com: 25) mail from-
Copy code

Use the failure log to enter the program source/function/function_mail.php. the Sendmail function will record the failure. In the above log, the code in the sendmail function is "mail from. In this way, locate the specific error.

  1. Fputs ($ FP, "mail from: <". preg_replace ("/. * \ <(. + ?) \>. */"," \ 1 ", $ email_from)."> \ r \ n ");
  2. $ Lastmessage = fgets ($ FP, 512 );
  3. If (substr ($ lastmessage, 0, 3 )! = 250 ){
  4. Fputs ($ FP, "mail from: <". preg_replace ("/. * \ <(. + ?) \>. */"," \ 1 ", $ email_from)."> \ r \ n ");
  5. $ Lastmessage = fgets ($ FP, 512 );
  6. If (substr ($ lastmessage, 0, 3 )! = 250 ){
  7. Runlog ('smtp ', "({$ _ g [setting] [mail] [server] }:{$ _ g [setting] [mail] [port]}) mail from-$ lastmessage ", 0 );
  8. Return false;
  9. }
  10. }
Copy code

Example 2:

  1. Unable to connect to the SMTP server
Copy code

Locate the code Sendmail Function

  1. If (! $ Fp = fsocketopen ($ _ g ['setting'] ['mail'] ['server'], $ _ g ['setting'] ['mail'] ['Port'], $ errno, $ errstr, 30 )){
  2. Runlog ('smtp ', "({$ _ g [setting] [mail] [server] }:{$ _ g [setting] [mail] [port]}) connect-unable to connect to the SMTP server ", 0 );
  3. Return false;
  4. }
Copy code

This error may be caused by the server disabling access to the external email server .. Here we will not illustrate each type of errors. The Troubleshooting logic is to locate the error logs and analyze the possible causes of the error.

Common Errors:

1. The server does not open port 25

Method: Check whether port 25 is enabled on the server. You can run the Telnet command to verify the port 25 and install Telnet locally (you can search for related tutorials online for installation methods ), run -- Enter cmd -- enter Telnet www.zhanhelp.com (or IP) port 25 to view the returned information. Or ask the Space Provider if port 25 is enabled.

2. Whether the SMTP server is correct and there are no spaces at the end. Whether to enable the SMTP server in the mailbox settings of the mailbox;
3. Whether the server can Set firewall filtering and other functions.

 

Discuz x3.2 setting registered email activation_enterprise mail failed to send email

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.