Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Feature wanted - one email a day

LeftBrainLeftBrain ✭✭
edited May 2011 in Vanilla 2.0 - 2.8
Any chance you can create a way to have the system collect all the new posts and send only a single email rather than a new email every time a new message is posted? Is there some way to already do this?

Comments

  • cdavidcdavid New
    edited May 2011
    Hello @Left+Brain !

    That is rather hard to do without any security problems. Mainly, what you are asking for is a regular process, while all the PHP code is executed on the fly, when a Web request comes in.

    On Linux (and most likely Mac) systems, it should be easy to do that -- as user www-data, you tell the kernel to run a certain query and find out the discussions in the past 24h and send out the e-mail. Unfortunately, I am not so certain about Windows.

    I started reading about this... http://drupal.org/node/31506 , but I won't have time for development until the end of the month, most likely.

    /cd
  • @cdavid - thanks for the response!

    I was just thinking it could send the RSS feed of the whole site but I suppose it's more complicated than that.

    Thanks for the info. Great plugin!

    Perry, 44
  • @cdavid, maybe you could leave the cron stuff up to the developer, but have a setting to queue up emails and expose a script somewhere that, when run, will send out all emails since it was last run.
  • Just talking to a client about this today. The client wanted all their users to be subscribed to everything by default so that they were prodded every time anything happened, and then to let them unsubscribe if they did not like that default setting.

    One issue with this is that since emails are sent out immediately a post is made, making a post would get *very* slow for a large number of users. This is a design flaw in many discussion forums - there needs to be a way to move the actual sending of emails to an off-line process, whether that happens on bulk or is drip-fed through other means, can be dealt with there. @allspiritseve makes this point too - emails created during user interactions should be *queued for sending*, not immediately sent. The Vanilla core should provide an API for this so that all plugins can use it consistently.

    As for the digest emails (the name often given to regular updates of what is being posted), dealing with the permissions is probably the easiest bit. There will be a finite number of combinations of roles that users have, so looping over those combinations to put together an email for each would not be difficult. If you want to also limit what users get in their digest, then it becomes a little more complicated to do in bulk, and probably impossible with the subscribed categories being stored as serialized arrays against each user (yuk - serialized data that defines relationships in databases should be against the law ;-).

    I think for my client I will be putting together digests from the RSS feeds and sending those out, but dealing with it entirely externally to Vanilla. I only need it for a single role, so sorting out the permissions is relatively easy.
  • CD, any luck yet with html, we getting all codes in emails
  • I've been looking how to collect emails addresses in a file and send a global email news, update's, to generate continued logins and interest. Is there anyway.

  • Also to upload news treads directly into a discussion after sending a global email to members. similar to email i receive from Thaivisa most days. It makes me click one or two items and comment. image

Sign In or Register to comment.