mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
* Admin: fix async service testjob to run on a default install (no phpgwapi)
This commit is contained in:
parent
ce684b0ee7
commit
b17fd7004e
@ -190,15 +190,22 @@ class admin_asyncservice
|
|||||||
echo $GLOBALS['egw']->framework->footer();
|
echo $GLOBALS['egw']->framework->footer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback for test-job
|
||||||
|
*
|
||||||
|
* @param string $to email address to send mail to
|
||||||
|
*/
|
||||||
function test($to)
|
function test($to)
|
||||||
{
|
{
|
||||||
$returncode = $GLOBALS['egw']->send->msg('email',$to,$subject='Asynchronous timed services','Greetings from cron ;-)');
|
try {
|
||||||
|
$mail = new Api\Mailer();
|
||||||
if (!$returncode) // not nice, but better than failing silently
|
$mail->setBody('Greetings from cron ;-)');
|
||||||
{
|
$mail->addHeader('Subject', 'Asynchronous timed services');
|
||||||
echo "<p>bocalendar::send_update: sending message to '$to' subject='$subject' failed !!!<br>\n";
|
$mail->addAddress($to);
|
||||||
echo $GLOBALS['egw']->send->err['desc']."</p>\n";
|
$mail->send();
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
_egw_log_exception($e);
|
||||||
}
|
}
|
||||||
//print_r($GLOBALS['egw_info']['user']);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user