MyBB Community Forums

Full Version: Daily Email Summary of New Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I did some searching and couldn't find anything that could do what I wanted. See my original thread.

So I just decided to code my own.

All it does is email the users (I have < 10 in my Forum) a summary of all new posts during the previous 24 hours. The emails are sent every day at midnight.

I had no previous experience with MyBB, but just looked through other code to figure out what I needed. So my apologies if I'm not using the right functions. I'm sure there's a much better way to do what I'm doing Smile

But...at least it works!

How to install (use at your own risk!):
  1. bb2html.php (attached) goes in /inc/
  2. mailsummary.php (attached) goes in /inc/tasks/
  3. Edit mailsummary.php, line 81 (YourDomainURL.com)
  4. Add New Task (/admin/index.php?module=tools/tasks&action=add) - see screenshot below

[Image: a0up0n.png]

If you'd like to change any of the functionality, just edit mailsummary.php. Here's an example of some things you may wish to modify:
  • List of user groups who receive email (currently Registered and Admins)
  • Email Subject (current *** DAILY POST SUMMARY ***)
  • Period to get posts from (currently past 24 hours)
  • Max characters to display per post (currently 500)
Maybe if I get some free time later on I'll migrate the code into an actual plugin and make it all purrttty. But for my purposes it works like a charm!

I definitely like MyBB though! So easy to use yet very powerful.

Here's a screenshot of what the email looks like. Note that the post title has a hyperlink to the actual post.
[Image: mj96dh.png]
very good i do like it IMO, yes it does need to go in to a full plugin tbh.
Also on the mailsummury.php line 81 the links would be set to your forum not ours you need to point that out in the tutorial.

But it works fine not many problems i see at the moment look forward to see this improving.
Thanks Ryan. I updated the mailsummary.php file. Good catch! Smile
Can they uncheck this option? How do you know the email is still valid?
Does this still work? I'm assuming it does. Smile Was it ever made into a plugin?

What if I don't want the posts to truncate at all?
(2012-03-17, 02:39 PM)fylliska Wrote: [ -> ]Does this still work? I'm assuming it does. Smile Was it ever made into a plugin?

What if I don't want the posts to truncate at all?

Does not work at all for me - task manager reports task completed ok, but no digest mail ever actually sent to anyone - would love to be proven wrong though!
(2012-11-01, 12:31 PM)ArchPrime Wrote: [ -> ]
(2012-03-17, 02:39 PM)fylliska Wrote: [ -> ]Does this still work? I'm assuming it does. Smile Was it ever made into a plugin?

What if I don't want the posts to truncate at all?

Does not work at all for me - task manager reports task completed ok, but no digest mail ever actually sent to anyone - would love to be proven wrong though!

Actually it does work - if and only if your ISP does not filter the messages out as spam. Sadly, as a mass mailing it does have many hallmarks of spam, and if your domain happens to have ever been used in spam via spoof email sender addresses, any mass mail from your domain much more likely to be filtered by ISP.
Is anyone still using this php file? I tried running it and it didn't quite work.