[Pushed] Any way to resend emails from System Email log?
(2018-02-12, 08:20 PM)dragonexpert Wrote:
define("IN_MYBB", 1);
require_once "global.php";
$query = $db->simple_select("mailerrors", "*");
while($row = $db->fetch_array($query))
my_mail($row['toaddress'], $row['subject'], $row['message'], $row['fromaddress']);

Create a file in the same directory as your forum and put that content into it.  Then navigate to the page you just created and it should send the emails.

Sorry for my dumb question but the file has to be created as a *.php file ?  and then just load it with the forumspage ?
Unfortunately until now the functionality has not been included in the lastest MyBB 18.20 built as far as I have seen and I had a lot of trouble with smtp because the mailsettings often had to change... so lots of not sent mails..  So this would be very useful. 

Anyway thanks for all of your help so far !
Best regards,
I'll share my simple task file I made.


Save it as emailresend.php.

Upload it to /inc/tasks/ folder.

In ACP you can either run it manually or actually add the task to run as frequently as you want. It's set to do 25 email resends per run. Adjust that in the file according to your needs.
@Mike , as you said, that code needs to be saved as a php file & it needs to be executed manually

@labrocca , Thank You
Thank you very much @labrocca for sharing the code and the instructions - will test it !  Making a task out of it is a very cool idea indeed :-)

Forum Jump:

Users browsing this thread: 1 Guest(s)