You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have write the events with schedule to run every hour But it throw error
TypeError: Cannot assign true to property CodeIgniter\Tasks\TaskLog::$output of type ?string
public static function sent_unqueue_mail()
{
$repo = new SQLEmail_listRepository();
$data = $repo->getUnQueueJobs();
$totalJob = 0;
if (is_array($data) && count($data)) {
$eLib = new \Mail\Libraries\Email();
foreach ($data as $k => $v) {
try {
$eLib->send($v);
$totalJob++;
} catch (\Exception $e) {
log_message('error', "Failed to send email for job $k: " . $e->getMessage());
}
}
}
log_message('info', "Sent Unqueue Completed $totalJob");
return ["Sent Unqueue Completed"];
}
I assigned events
Events::on('sent_unqueue_mail', '\Mail\Events\EventsMail::sent_unqueue_mail');
please help me to resolve this issues
The text was updated successfully, but these errors were encountered:
I have write the events with schedule to run every hour But it throw error
TypeError: Cannot assign true to property CodeIgniter\Tasks\TaskLog::$output of type ?string
public static function sent_unqueue_mail()
{
$repo = new SQLEmail_listRepository();
$data = $repo->getUnQueueJobs();
$totalJob = 0;
if (is_array($data) && count($data)) {
$eLib = new \Mail\Libraries\Email();
foreach ($data as $k => $v) {
try {
$eLib->send($v);
$totalJob++;
} catch (\Exception $e) {
log_message('error', "Failed to send email for job $k: " . $e->getMessage());
}
}
}
log_message('info', "Sent Unqueue Completed $totalJob");
return ["Sent Unqueue Completed"];
}
I assigned events
Events::on('sent_unqueue_mail', '\Mail\Events\EventsMail::sent_unqueue_mail');
please help me to resolve this issues
The text was updated successfully, but these errors were encountered: