File size: 1.82Kb
<?php
/**
* @name SHCMS Engine
* @copyright Shamsik © 2012
* Код зашищен авторскими правами
*/
/**
* Класс для отправки писем на почту
* @param mail()
*/
abstract class mails_listing
{
static function mails($title_mail, $text_mail, $time_mail)
{
global $timedate;
global $mail_users;
$subject = ''.$title_mail.'';
$message = '<div style="font-weight:700;color:#000;font-size:15px;font-family:Tahoma; text-align:center;">'.$title_mail.'</div>';
$message .= ''.$text_mail.'<hr/>';
$message .= '<div>Добавлено: '.$timedate->times($time_mail).'</div>';
$headers ="From: SHCMS Engine <shcms@".$_SERVER['HTTP_HOST'].">\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
mail($mail_users['email'], $subject, $message, $headers);
}
static function mails_c($name_email,$title_mail, $text_mail, $time_mail)
{
global $timedate;
$subject = ''.$title_mail.'';
$message = '<div style="font-weight:700;color:#000;font-size:15px;font-family:Tahoma; text-align:center;">'.$title_mail.'</div>';
$message .= ''.$text_mail.'<hr/>';
$message .= '<div>Добавлено: '.$timedate->times($time_mail).'</div>';
$headers ="From: SHCMS Engine <".$name_email.">\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
mail($name_email, $subject, $message, $headers);
}
}
?>