Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Criterias for cron_mailer.php to send e-mails

Hi!

I have NOTIF_FOLLOW enabled and NOTIF_PROG_TIME is set to 06:00 PM.

By some reason, the "php cront_mailer.php" does nothing, unless I "hack it" and change the "if" line to always true. Like this:

//if($values['NOTIF_FOLLOW'] == 'ON' && $values['NOTIF_PROG_TIME'] == date('H:i') && array_key_exists(date('l'), $day)){

if (true) {

    $mail->config_mailer();

    $selected = $mail->get_notif_selected();

    $body_mail = $mail->get_all_information($selected);

    $mail->send_notification($body_mail[$selected]['SUBJECT'], $body_mail[$selected]['FILE'], $selected);

}

I'm pretty sure that NOTIF_FOLLOW and NOTIF_PROG_TIME are ok, but what is the meaning of array_key_exists(date('l'), $day) ?

Thanks.
Regards.

ago in OCS Inventory NG server for Unix by (120 points)

Please log in or register to answer this question.

 
Powered by Question2Answer
...