Bugs I found:
1) When emailing for the first time, I had several thousand members to contact. The script stopped after 30 seconds, and I had no way to tell who had been emailed because the script sets everyone as being sent before it's actually done. No way to resume this, but not sure how to fix this either. Same thing will happen again in 30 days, because the same people will be contacted.
2) The $uheaders variable messed up the header of the email, it was from
Site Title <"Site Title"> rather than
Site Title <"email@site.com">. I removed this section to make it match the default vBulletin email cron scripts.
I've done some testing and I think I've managed to fix it, or at least get it to a standard that I'm personally happy with.
So my changes:
1) I add the list of sent and failed emails to an array which has the userid in it, to make it easier to troubleshoot and read when you receive the Report by email.
2) For the failed emails in the report, it shows the email address after the username. This is so you can see exactly why they failed (eg username.hotmail.com, username@email, etc).
3) I've added a quick summary at the top which tells you how many reminders were sent, how many failed, and the total number of inactive users that were found (successful+failed).
4) Made some changes to the script so it adds the emails to the queue rather than trying to send them all at once. So it may take a couple of hours to send 10,000 emails (using the CRON system), but at least the script won't fail half way.
5) Fixed the headers so now the email actually comes from the correct address. Before it was being rejected by a whole bunch of servers because the sending address was "Forum Name" instead of the email address.
I've attached my version to this post. Install the original script first, but upload my remindermail.php file into includes/cron/ instead of the default.
I'm not sure how this will work if you aren't using the mail queue, but I think it should be fine. And if you want to integrate my changes back into the original then go right ahead
If anyone uses my code, please don't bug the original author about it, he's not obligated to support someone else's modifications.
By the way, the Report email that I received listing 10,000 users that were emailed, it was 180KB. That's not a big problem though