Advertisement
gotchynow

emailresend.php

Mar 19th, 2019
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Email Resend Task
  4.  * Copyright 2018
  5.  */
  6.  
  7. function task_emailresend($task)
  8. {
  9.     global $mybb, $db;
  10.  
  11.     $options = array(
  12.         "limit_start" => 0,
  13.         "limit" => 25,
  14.         "order_by" => "dateline",
  15.         "order_dir" => "desc"
  16.     );
  17.  
  18.     $query = $db->simple_select("mailerrors", "*", "1=1",$options);
  19.     while($row = $db->fetch_array($query))
  20.     {
  21.  
  22.         $eid = $row['eid'];
  23.         my_mail($row['toaddress'], $row['subject'], $row['message'], $row['fromaddress']);
  24.  
  25.         $db->delete_query("mailerrors", "eid='{$eid}'");
  26.  
  27.     }
  28.  
  29.     add_task_log($task, "Mail Error Log Resent");
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement