We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28122
    • 51 Posts
    Well...perhaps it’s the operator, not the machine, and the trouble is with me... smiley
    As far as I can tell, I’ve configured ContactForm according to the documentation (and made sure to call it as uncached), but I get an aggravatingly general error message. "Sorry, there was an error! Please try again later."
    Where should I start hunting for clues?
      • 32241
      • 1,495 Posts
      any preview on this one? Like a screenshot or live page that we can look at?

      Thanks
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 28122
        • 51 Posts
        My apologies - I missed giving you a link! Sorry...
        http://christianeducationministries.com/index.php?id=4
          • 32241
          • 1,495 Posts
          Do this for me please.
          GO to your control panel, click ’Administration’ menu at the top of your control panel usually, and click ’View system info’. On the right panel, click ’View’ link on ’phpInfo()’.

          Now search for the word ’safe_mode’ inside your phpinfo page, and see the parameter, is it being set on or off. If it’s off, then it might be one of the reason why this thing is not working.

          Please report back.
          Sincerely,
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 28122
            • 51 Posts
            Safe mode is off.
              • 28471
              • 48 Posts
              Sounds like something wrong with the mail() command

              Extra characters in the headers or subject line can stop the mail from sending.

              Go to snippets - > contactform and look for the following block of code:

              if (mail($to, $subject, $body, $headers)) {
              $SendMail .= "<p class=\"$successClass\">$success</p>";
              $SendMail .= ($debug) ? "<p>$to\n$headers\n$subject\n$body</p>" : ’’;
              $from="";
              $from_email="";
              $message="";
              } else {
              $SendMail .= "<p class=’$failClass’>$generalFail</p>";
              $send = "false";

              Just after the else {
              print out the $to, $subject, $headers lines to see what these values are.
              __________________
              example:
              else {
              $SendMail .= "<!-- to: $to -->\n<!-- subject: $subject -->\n<!-- headers: $headers -->\n<!-- body: $body -->\n";
              $SendMail .= "<p class=’$failClass’>$generalFail</p>";
              $send = "false";
              }
              __________________


              Note: this will appear in source code rather than page, remove the <!-- --> to display normally

              Also, are you on linux or windows server?, does it use smtp for mail?

                • 28122
                • 51 Posts
                After } else { :
                $SendMail .= "<p class='$failClass'>$generalFail</p>";
                            $send = "false";

                I’m on a Linux server; CentOS 4, to be exact. I’m not quite certain what you’re meaning by using smtp for mail...this server can definitely send email via smtp (I use multiple pop3/smtp accounts to connect to it). Sendmail is the MTA.
                  • 28471
                  • 48 Posts
                  Quote from: sparselogic at Feb 25, 2006, 05:34 AM

                  After } else { :
                  $SendMail .= "<p class='$failClass'>$generalFail</p>";
                              $send = "false";

                  I’m on a Linux server; CentOS 4, to be exact. I’m not quite certain what you’re meaning by using smtp for mail...this server can definitely send email via smtp (I use multiple pop3/smtp accounts to connect to it). Sendmail is the MTA.

                  SMTP is used for windows servers, so it wont apply to your case.

                  Could you please add the following code just after the else { and view the source to grab the results. There might be an extra linefeed or another character in the subject or headers that is causing the problem.

                  $SendMail .= "<!-- to: $to -->\n<!-- subject: $subject -->\n<!-- headers: $headers -->\n<!-- body: $body -->\n";
                  

                  • SMTP was developed long before Windows even existed (1980-1982). Linux certainly uses it.

                    Sendmail (as well as all other mail transfer agents such as Postfix) is based on it, and is still the most popular mail agent in the UNIX world.

                    http://www.tcpipguide.com/free/t_SMTPOverviewHistoryandStandards.htm
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 28471
                      • 48 Posts
                      Quote from: sottwell at Feb 25, 2006, 08:34 AM

                      SMTP was developed long before Windows even existed (1980-1982). Linux certainly uses it.

                      Sendmail (as well as all other mail transfer agents such as Postfix) is based on it, and is still the most popular mail agent in the UNIX world.

                      http://www.tcpipguide.com/free/t_SMTPOverviewHistoryandStandards.htm

                      Ooops, very good point, I think my put my foot in it there... embarrassed

                      Think I need some sleep.