We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42183
    • 3 Posts
    Hi folks,

    I've just been messing around for the last hour or two trying to get modMail working, using the rtfm page as my source. I was consistently getting "Could not instantiate mail function" errors in the log.

    After checking and re-checking my code against the documentation, I eventually reverse-engineered my way through the modMailer class and found that it's actually the documentation at fault.

    The page in question is http://rtfm.modx.com/display/revolution20/modMail.

    Line 7 of the "Usage" example calls for:
    $modx->mail->set(modMail::MAIL_SENDER,'Johnny Tester');

    The MAIL_SENDER field is used for the "From" email address, not the name as it appears in the From field. This was causing numerous problems at the receiving MTA, so all my emails were returned undelivered.

    So, as a quick fix, would someone with the appropriate authority (not me, it seems!) please update the modMail docs page.
    Line 7 should probably be removed completely, because lines 5 and 6 render it redundant. And also because it is wrong, of course!

    Cheers,

    Russell
    • Thanks, got rid of the line smiley

      In the future it may be best to report documentation bugs here: http://tracker.modx.com/projects/docs/issues A number of volunteers helping with the documentation look there to find things that need to be sorted out, and things in the forums could be missed, which would be a shame.

        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 42183
        • 3 Posts
        Thanks, I'll keep that in mind. I did search around for a "feedback" link or similar on the rtfm wiki, but couldn't find one. Perhaps it would be worth adding that link to the bottom of every rtfm page?

        Just my thoughts as an outsider and a newcomer to modx.
          • 42183
          • 3 Posts
          Oh, and thanks for updating the page! smiley