We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36451
    • 264 Posts
    Same problem here.
    Quote from: Maaike at Sep 29, 2006, 03:55 AM

    In the file manager > processors > save_user.processor.php I changed this line (line 446):
    if(!mail($email, $emailsubject, $message, "From: ".$emailsender."\r\n"."X-Mailer: Content Manager - PHP/".phpversion(), "-f $emailsender")) {

    into this:
    if(!mail($email, $emailsubject, $message, "From: ".$emailsender."\r\n"."X-Mailer: Content Manager - PHP/".phpversion())) {

    In other words: I removed the last part.
    In MODx 0.95 it is line 430 of save_user.processor.php, but the suggested solution does not work for me. I will have to send the email manually. undecided
      • 33372
      • 1,611 Posts
      Your problem must be at least somewhat different, or that fix would’ve solved it. A number of servers don’t allow you to use the -f switch (and some mail servers block email or presume it is spam when they see that it has been used). What exactly happens when you try to send mail, and what is the error that you’re receiving?
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 36451
        • 264 Posts
        I want to change the password of a given manager or web user:

        Manager -> Create/Edit user -> New password -> Let MODx generate a password -> Send the new password by e-mail -> Javascript-alert: "Error while sending email to (*)"

        No email will be sent. Print the created password on the screen works fine. Not sure what to do about it and what’s wrong with my install.

        (*) no mail address here, unless you fix this little issue.
          • 33372
          • 1,611 Posts
          I guess I would check that your host allows you to use the mail() function in general (and your mail configuration is correct). Can you send email with a simple snippet like mail(’[email protected]’, ’test’, ’this is a test’, ’From: [email protected]’); ? If not, then the problem is your mail setup in general (it might need fixing, or you might need to use SMTP or some other server-specific method).
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 36451
            • 264 Posts
            Sorry! My fault! I’ve simply changed only the "save_user.processor.php" but checked the functionality with a webuser account! Now I changed the "save_web_user.processor.php" and it works fine. laugh
            Like suggested I have removed the
            , "-f $emailsender"
            from the first part of the if clause, but now MODx sends the notification mail twice! So I had to remove the whole second part from line 430 / 460
             || !mail($email, $emailsubject, $message, "From: " . $emailsender . "\r\n" . "X-Mailer: Content Manager - PHP/" . phpversion())
            This is strange, I think.

            Anyway, it works. Thank you for caring, ZAP.
              • 33372
              • 1,611 Posts
              Hee hee hee. You’ll find lots of caring souls here. Glad you figured it out.
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn't very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options