We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5112
    • 38 Posts
    yeah, maybe my host is the problem. i use webfaction and have been happy with them. they do not officially support modx. they told me there is no reason it should not work since they officially support drupal, wordpress, plone, joomla and others. but since they don’t officially support modx they cant help me with the custom scripts modx uses. phpmailer should work, but they don’t know the manager scripts that send parameters to phpmailer.

    i tried to get the suggestions (links above) to work, but at this point i am giving up. i spent days on this last spring and gave up (same host). i have now spent days on it again. i am thoroughly confused on which files do what, what i should leave alone, and what files i should change and where.

    i am not skilled enough to figure out what scripts to change on 4-5 files. i have so many backup copies after trying all these things it is crazy.

    i am done until modx can officially support smtp. i hope someone will build a easy way (without) getting into the core files to use smtp. please!!!! i am begging!!!!

    for now i will have to live without all the manager email and lost password functionality. it is a shame.
      • 5112
      • 38 Posts
      i know i said i gave up, but i am making some headway. i can now send the welcome login details when i add "manager users" and the email with a new password also gets sent when requested while logged in viewing a manager users info.

      here is what i did.
      A) class.phpmailer.php
      1. open in manager>includes>controls
      2. change var $Mailer to "smtp"
      3. SMTP VARIABLES section - add your info for $Host, $Port, $SMTPAuth, $Username, and $Password
      4. *gmail only* - comment out code as shown in http://webomania.wordpress.com/2007/06/12/getting-phpmailer-to-connect-to-gmails-smtp-server/

      B) save_user.processor.php & save_web_user.processor.php
      1. open in manager>processors
      2. change sendMailMessage section as described in http://modxcms.com/forums/index.php/topic,19669.0.html, BUT change $mail->IsMail(); to $mail->isSMTP();

      C) when logged into the manager, goto tools>configuration>user and enter a the email address for which you are using the smtp server variables entered above.

      i believe the only other system message that i need deliverable is the "Forgot your password?" link @ http://mydomain.com/manager/ when not logged in. it says it was sent, but it never gets delivered. i am convinced that the "forgot manager login" plugin needs to be edited like the documents above to call phpmailer, but i am not a coder and don’t think i can make it work. help anyone?

      any other system messages i am going to have to switch over to smtp that i am not aware of?
        • 20413
        • 2,877 Posts
        Nice! smiley
        Well what MODx where you using?
        and the Manager password reminder has been updated to prevent forged logins under different usernames
        http://modxcms.com/forums/index.php?topic=41882.0

        // 1.0 needed this fix ---> http://modxcms.com/forums/index.php/topic,38236.msg230624.html#msg230624
          @hawproductions | http://mrhaw.com/

          Infograph: MODX Advanced Install in 7 steps:
          http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

          Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
          http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
          • 5112
          • 38 Posts
          yes, i am using 1.0.2. but i don’t think that issue applies to me. i have no problem adding users.

          what i need now is for the unlogged-in forgot password email to be generated. this IS NOT the email that you generate when logged in. this IS the email that gets generated if someone tries to login to manager and cant remember their password. they click on the link, enter their username and submit.

          where is the include that does these process? i believe it is the plugin i referred to.

          thanks for your help.
            • 5112
            • 38 Posts
            i think i have the "Forgot Manager Login" plugin edited to work with phpmailer and smtp. external password requests are sent successfully.

            in the plugin i replaced:
            $mail = mail($to, $subject, $body, $headers);

            with:
            # include PHP Mailer
            include_once "../manager/includes/controls/class.phpmailer.php";

            $mail = new PHPMailer();
            $mail->isSMTP();
            $mail->CharSet = $modx->config[’modx_charset’];
            $mail->AddAddress($to);
            $mail->From = "[email protected]";
            $mail->FromName = "Website CMS";
            $mail->Subject = $subject;
            $mail->IsHTML(true);
            $mail->Body = $body;
            $mail->send();

            not sure if it is pretty code wise, but it works for me.
              • 20413
              • 2,877 Posts
              Thanks for sharing that! smiley
                @hawproductions | http://mrhaw.com/

                Infograph: MODX Advanced Install in 7 steps:
                http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower