First of all, goes my scenario and what I want to accomplish: I have a website for a private elementary school. In there I have two custom post types: notice and homework.
Each time I publish a notice, I want all the parents to receive it (a group of users) as soon as it is available (the fact that it can be scheduled to a fixed time would be a plus).
On the other end are the homeworks: each teacher captures the homework for its group of students. At the end of the day, a group may have five homeworks. Therefore, I do not want the mail to fire five times, but I want a mail with the homework of the day to be sent at the end of work day (a fixed time).
For the first one problem, I had considered eNewsletter, since it is only one Notice. However, is there a way to automatically create one from each Notice? Or posibbly convert the newsletter to the notice custom type? Or is its application for other uses? Also Jetpack suscription exists, but that works only for regular posts. Is there anything that sends by mail a custom post type upon its publishing?
The second problem need more thought since it involves more logic. First, we are talking about sending all the content available at a fixed time (possibly CRON or something). Second, we are talking about a filter by the date of today. And third, and most complex, the filter has to send the ones related only to that group: for instance, ‘group of users A’ receives the homework of first grade, and ‘group of users B’ receives homework of second grade. Therefore, the filter needs to receive the value of a custom field in order to filter.
So, first problems gets solved with automatic sending of custom post type to mail.
Second gets fixed with a lot of stuff, but I assume possibly the advice given for first is going to help.
I wonder, is there a plugin that can assist me on this tasks? Or it all boils down to custom coding? (for the second part I think it is, but maybe first one…:wink:
I am open to suggestions. I just want to know if there is an easier way before walking into the functions.php way with custom code.