Automatically emailing the same resource every day

In MODx 3.1.2 I have a page that uses pdoResources to summarize a bunch if child pages and I want to setup an email subscribe/unsubscribe feature to have that emailed every day or twice a week regardless of whether it has changes. Sort of like a “these tickets are still open” kind of reminder.

A lot of the email add-ons like Good News seem to require manual creation of an email campaign to be individually created and scheduled, rather than a regularly recurring email generated from the same resource.

The A.I’s suggested using the Subscribe, EmailResource, and cronManager addons but Subscribe appears to require Login and I didn’t really want to clutter up the main user Manager in MODx.

  • So in place of Subscribe, the A.I’s suggested using Eletters which could create a self contained email list. However, Eletters doesn’t appear to be compatible with MODx 3.
  • So then it suggested modMore mSms, which I can’t find.
  • Then it suggested formz, which also doesn’t appear in the MODx 3 repository and I assume isn’t compatible.

Can anyone think of another good way of doing this?

It might be possible to use a custom snippet that uses the Notify class to pull the subscriber list and send the emails, which could contain a link to the page in question, or the text of the page itself. Subscribe would need to be installed just for the “unsubscribe” link (assuming that your want one).

Notify is a way of sending a link to a page that’s new or altered, but the send is manual. So it doesn’t quite fit your use case, but I think you could selectively call parts of Notify in a snippet on a page, or just a file with PHP code visited by a cron job.

Subscribe, BTW, doesn’t send anything. It’s just a convenient way of letting people sign up and get put into one or more user groups (which you’d have to do manually without Subscribe).

All that said, it might be simpler to just write custom code that uses a mail class like modMailX, or mailgunX. Both are part of the Notify package, along with the mailservice inferface (which I don’t think you’d need to use).

1 Like