*/
namespace Friendica\Protocol;
+use Friendica\Core\Logger;
use Friendica\Content\Text\HTML;
use Friendica\Core\Protocol;
$errors = imap_errors();
if (!empty($errors)) {
- logger('IMAP Errors occured: ' . json_encode($errors));
+ Logger::log('IMAP Errors occured: ' . json_encode($errors));
}
$alerts = imap_alerts();
if (!empty($alerts)) {
- logger('IMAP Alerts occured: ' . json_encode($alerts));
+ Logger::log('IMAP Alerts occured: ' . json_encode($alerts));
}
return $mbox;
if (!$search1) {
$search1 = [];
} else {
- logger("Found mails from ".$email_addr, LOGGER_DEBUG);
+ Logger::log("Found mails from ".$email_addr, LOGGER_DEBUG);
}
$search2 = @imap_search($mbox, 'TO "' . $email_addr . '"', SE_UID);
if (!$search2) {
$search2 = [];
} else {
- logger("Found mails to ".$email_addr, LOGGER_DEBUG);
+ Logger::log("Found mails to ".$email_addr, LOGGER_DEBUG);
}
$search3 = @imap_search($mbox, 'CC "' . $email_addr . '"', SE_UID);
if (!$search3) {
$search3 = [];
} else {
- logger("Found mails cc ".$email_addr, LOGGER_DEBUG);
+ Logger::log("Found mails cc ".$email_addr, LOGGER_DEBUG);
}
$res = array_unique(array_merge($search1, $search2, $search3));
//$message = '<html><body>' . $html . '</body></html>';
//$message = html2plain($html);
- logger('notifier: email delivery to ' . $addr);
+ Logger::log('notifier: email delivery to ' . $addr);
mail($addr, $subject, $body, $headers);
}