Файл: sys/cron/email_send.php
Строк: 13
<?
$set['mail_to_send'] = 'admin@'.$_SERVER['HTTP_HOST'];
$c = count::query('mail_to_send'," `time` < ". time());
if ($c != 0)
# отправка запланированных писем
{
$c = query("SELECT * FROM `mail_to_send` where `time` < ". time());
while ($mail = mysql_fetch_assoc($c))
{
$adds = "From: '$set[mail_to_send]' <$set[mail_to_send]>";
$adds .= "Content-Type: text/html; charset=utf-8";
mail($mail['mail'],'=?utf-8?B?'.base64_encode($mail['them']).'?=', $mail['msg'] ,$adds);
query("DELETE FROM `mail_to_send` WHERE `id` = ". $mail['id']);
}
}
else $countUpdate = false;