We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20371
    • 58 Posts
    I made a mandrill hook for FormIt today, I thought i'd post it here just so others can find it in future.

    It's a snap to use, you really just add a mandrill api key in addition to the usual formit parameters. There's proper instructions over at github.

    You can find the formit-mandrill-hook repo on github!
      • 23018
      • 353 Posts
      A big thumbs up for sharing!

      Can't believe nobody responded to your post.

      It worked right out of the box. I'm going to play around with some api features not covered sofar and let you know how it turns out.

      Cheers,

      pepebe
        Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
        • 30585
        • 833 Posts
        Sweet! I'll definitely give it a try.

        Thanks for the good work.
          A MODx Fanatic
          • 30585
          • 833 Posts
          Getting the following error although safe_mode is off:
          (ERROR @ /assets/php/mandrill/src/Mandrill.php : 68) PHP warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set.

          Other than the email not being sent, FormIt seems to be working just fine.
            A MODx Fanatic
          • I've simply set up the MODX email settings to use Mandrill's SMTP API, and then just use the normal email hook smiley
              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.
            • Jay Gilmore Reply #6, 9 years ago
              I know this is an old thread but it would be awesome to be able to turn this into a proper extra that could be installed from the Package Manager. If you're not interested in doing that, I am sure I or someone else could make it happen. I also think the files should be stored in /core/components/sendMandrill/mandrill/ rather than assets. This could be even created by using PackMan which is an Extra for building simple MODX Packages. Great work nonetheless. Thanks for this.
                Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
                • 3749
                • 24,544 Posts
                FYI, there is also the MandrillX class, though you'd still need a custom FormIt postHook to run it. Notify has been using it for some time and it's very reliable. http://modx.com/extras/package/mandrillx
                  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
                • Jay Gilmore Reply #8, 9 years ago
                  The next step would be a way to use Mandrill's REST api from MODX instead of using SMTP. Many cPanel hosts do not allow remote SMTP for some reason.
                    Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
                    • 3749
                    • 24,544 Posts
                    Quote from: smashingred at Apr 13, 2015, 05:17 PM
                    The next step would be a way to use Mandrill's REST api from MODX instead of using SMTP. Many cPanel hosts do not allow remote SMTP for some reason.

                    The MandrillX class does that, but it would be nice if were built into MODX so you could have that option instead of SMTP just by setting a System Setting.

                    It's hard to say how difficult it would be. It might just be a matter of rewriting modPhpMailer to respond to a new System Setting in addition to the SMTP System Setting.
                      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
                      • 20371
                      • 58 Posts
                      I'll have a look at creating a package for this in the next few days.. when I originally made it I wasn't sure if anyone else would find it useful so I didn't bother with a package.

                      Also thanks for the tip re the proper path..