We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28248
    • 5 Posts
    Hi,everyone.I’m just signed up for this problem that I worked for past 2 days,and haven’t solved yet.
    I have searched google and this fourm for many times,read many documents and topics,tried all the solutions they offered,but it still not work.
    So,please,I need help.
    Here is my problem:
    My register page keep warning: "An error while sending the email. Please contact the Site Administrator." And the user was created,but the user can’t recieve the email with password.
    I’ve tried to change the eform use SMTP follow below link:
    http://modxcms.com/forums/index.php?topic=32969.0
    Then the warning still showing.
    I also read this link: http://modxcms.com/forums/index.php?topic=35553.0
    So I creat a php file in the root of www,code is:
    <?php
    $message = "Test 1\nTest 2\nTest 3";
    mail(’[email protected]’, ’Testing mail function’, $message);
    ?>
    And when I visit the page in IE,it displayed nothing but a blank page,my email didn’t recieve anything either.
    Many other ways I’ve tried yestaday and I can’t remember well.
    My server is Linux and it seems have both sendmail and qmail running,by the way: I’m not very good at Linux.
    Another website which is the same with the one I’m working on in the US is running well: register and feedback both can send mail.The US server installed InterWorx-CP,if I have to install that in this server too...
    Now I have no idea with this problem,someone advise?
    TKS!
    embarrassed

    P.S.: When I visit test.php which I created in the root of www with code below:
    <?php
    require("class.phpmailer.php");
    $mail = new PHPMailer();
    $address = $_POST[’address’];
    $mail->IsMail();
    //$mail->IsSMTP(); // set mailer to use SMTP
    //$mail->Host = "xxx.xxx.xxx"; // specify main and backup server
    //$mail->SMTPAuth = true; // turn on SMTP authentication
    //$mail->Username = "[email protected]"; // SMTP username
    //$mail->Password = "xxx"; // SMTP password

    $mail->From = "[email protected]";
    $mail->FromName = "test";
    $mail->AddAddress("$address", "");
    //$mail->AddAddress(""); // name is optional
    //$mail->AddReplyTo("", "");

    //$mail->WordWrap = 50; // set word wrap to 50 characters
    //$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
    //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
    //$mail->IsHTML(true); // set email format to HTML
    $mail->CharSet = "utf-8";
    $mail->Subject = "PHPMailer测试邮件";
    $mail->Body = "Hello,这是测试邮件";
    $mail->AltBody = "This is the body in plain text for non-HTML mail clients";

    if(!$mail->Send())
    {
    echo "Message could not be sent. <p>";
    echo "Mailer Error: " . $mail->ErrorInfo;
    exit;
    }

    echo "Message has been sent";
    ?>
    The IE warning:
    Message could not be sent.
    Mailer Error: Could not instantiate mail function.
      • 3749
      • 24,544 Posts
      If you didn’t receive email from your PHP mail snippet, the odds are that your host has the mail() function disabled. This also explains why the same setup works at another server.

      You should probably confirm this with your hosting service. If that’s the case, the alternative is to reconfigure things so that SMTP is used instead of mail().

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 28248
        • 5 Posts
        Quote from: BobRay at May 08, 2009, 12:11 PM

        If you didn’t receive email from your PHP mail snippet, the odds are that your host has the mail() function disabled.  This also explains why the same setup works at another server.

        You should probably confirm this with your hosting service. If that’s the case, the alternative is to reconfigure things so that SMTP is used instead of mail().



        TKS for reply.
        I would like to know where should I open the mail() function,I see code in php.ini like:
        [mail function]
        ; For Win32 only.
        SMTP = localhost
        smtp_port = 25

        ; For Win32 only.
        ;sendmail_from = [email protected]

        ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
        sendmail_path = /usr/sbin/sendmail -t -i

        ; Force the addition of the specified parameters to be passed as extra parameters
        ; to the sendmail binary. These parameters will always replace the value of
        ; the 5th parameter to mail(), even in safe mode.
        ;mail.force_extra_parameters =

        If I have to change any of those codes?

        And I have already tried reconfigure things to use SMTP,but it didn’t work either.
        When I test with the SMTP,it’s warning: SMTP Error: Could not connect to SMTP host.

        I have two servers in US an CN,they both use CENTOS Linux.
          • 28248
          • 5 Posts
          I have unistall the qmail,and install sendmail.
          Then the register display "Thank-you for registering
          Your password has been sent to your email address, please check your email and proceed to log in. "
          But when I check the user’s email,there’s nothing,the same in the notify email.
          The test.php can execute successfully too,but no email recieved either.
          No idea again...
            • 28248
            • 5 Posts
            The following is the message I got:

            The original message was received at Sat, 9 May 2009 07:57:09 +0300
            from netlan [127.0.0.1]

            ----- The following addresses had permanent fatal errors -----
            <[email protected]>
            (reason: 553 sorry, your envelope sender domain must exist (#5.7.1))

            ----- Transcript of session follows -----
            ... while talking to imap.xxx.xxx.:
            >>> MAIL From:<[email protected]> SIZE=1329
            <<< 553 sorry, your envelope sender domain must exist (#5.7.1)
            501 5.6.0 Data format error

            Anyone have idea with this?
              • 28248
              • 5 Posts
              Fine,I finally worked it out.
              So hard...
              undecided
                • 3749
                • 24,544 Posts
                I’m glad you got it solved. Sorry not to be more help.

                What turned out to be the problem and how did you solve it?
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting