We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38357
    • 178 Posts
    Hello,
    Could someone please advise as to what is currently the most suitable package which would allow me to compose and send emails to all members of a particular group of registered users - or in fact all registered users if required? Something simple with out too much of a setup process?

    Thanks
      • 40045
      • 534 Posts
      I dont think there is a ready to use package for this kind of thing.

      I would try to (ab)use/change this code:

      // create the following data out of the xpdo query below
      $to = "[email protected]";
          $subject = " documents";
          $message = "The latest edits.\r\n";
          $headers = 'From: [email protected]' . "\r\n";
       
      $alertTV = $modx->getTemplateVar('alert', "", $id);
      if ($alertTV['value'] ==  1) {
       
      $docLink =  $modx->makeUrl($id,"", "", "full");
      if ($mode ==  "upd") {
      $activity = "Update";
      }else{
      $activity = "New";
      }
      $subject = $activity . $subject;
      mail($to, $subject, $message . $docLink, $headers);
      //$modx->sendAlert('alert',1,1,$subject,$message . $docLink,1); // we do not need this here
      }
      


      from https://forums.modx.com/index.php/topic,39714.msg240317.html#msg240317

      to fit your needs in combination with something like

      $c = $modx->newQuery('modUser');
      $users = $modx->getCollection("modUser",$c);
       
      foreach($users as $user){
          $userArray = $user->toArray();
          echo "
      ".$userArray['username']."==".$userArray['fullname'];
      }
      


      from https://forums.modx.com/?action=thread&thread=74865

      then create a hidden resource group + a container (for the messagers aka resources which act as messages) and message resources with specific TVs for subject, message, users or usergroups and a checkbox "send email" (which has a value of 1 = true in the tv setup) and attach the code to a plugin which is linked to the OnDocFormSave event.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 3749
          • 24,544 Posts
          I think the combination of Subscribe and Notify would be perfect for that.

          http://bobsguides.com/subscribe-tutorial.html

          http://bobsguides.com/notify-tutorial.html
            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
            • 38357
            • 178 Posts
            Quote from: BobRay at Feb 10, 2013, 01:22 AM
            I think the combination of Subscribe and Notify would be perfect for that.
            Thanks Bob, Susan and exside. I'm reading the Notify tutorial right now smiley
              • 10208 ☆ A M B ☆
              • 1,780 Posts
              While talking to my maaavelous host SkyToaster tonight, I found out that there are no throttling settings within MODX. Servers are pretty sticky about mails/hr, and with good reason.

              I'm working with a client with over 3700 emails in a list. Currently I use poMMo for their mailings and while I may be happy to stick with that, what I really want is an all in one mailing system through MODX. Which is what I think you're looking for.

              Patrick suggested I look into Mandrill They offer 12K emails per month for free. It's a transactional service by default, yet it looks as if sending mailings/newsletters is also supported.

              I've signed up my client email there and am working on a dev site attempting to implement this. So far, I'm not mailing, but since SkyToaster is such a freakin awesome host, Patrick is going to help me with the settings after he sleeps. I'll report back with results soon. I do recommend checking it out though if you're going to do mailings through MODX.

              There's always the integrated packages for Mailchimp of course, but a large list is going to cost your client significant monthly fees with a service like Mailchimp. IMO, if you're promoting MODX mailing lists, there should be no additional costs beyond development.

                Frogabog- MODX Websites in Portland Oregon
                "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • 40045
                • 534 Posts
                Quote from: BobRay at Feb 10, 2013, 01:22 AM
                I think the combination of Subscribe and Notify would be perfect for that.

                http://bobsguides.com/subscribe-tutorial.html

                http://bobsguides.com/notify-tutorial.html


                Indeed, that suggestion looks perfect =), did totally forget about that one^^...Just thinking if with this combination an alternative MODx Newsletter System could be realized (As alternative to the unfortunately more or less unusable GroupEletters extra), what do you think bob?
                  • 3749
                  • 24,544 Posts
                  I'm not familiar with GroupEletters at all, but Subscribe works well for me. Whether you would use Notify or EmailResource would depend on whether you want to send an entire resource as a newsletter (EmailResource) or just a link to a newsletter Resource on your site (Notify). With Subscribe, users can optionally manage their preferences (tags) and/or their User Group memberships.

                  With Notify, you can use just about any format and content for your emails. You can also have separate Tpls and select from them when you're going to send. The new version lets you use either AND or OR for the selected interests and sends an Unsubscribe/Manage Preferences link at the end of every email. I use it all the time at Bob's Guides.

                  EmailResource has a kind of funky UI, but it does a nice job of formatting and sending a Resource/Newsletter as an email. I know it's being used on commercial sites to send Newsletters. Someday, it will be refactored to work just like Notify.

                  Someday, both Notify and EmailResource may work with Mandrill/MailChimp -- not enough hours in the day. wink

                    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