mirror of
https://github.com/Oreolek/kangana.git
synced 2024-06-26 03:40:56 +03:00
DAR-13: subscriptions
This commit is contained in:
parent
bcd554f60d
commit
50fd1b39a3
|
@ -66,8 +66,17 @@ class Model_Letter extends ORM {
|
|||
**/
|
||||
public static function _send($address, $text, $subject, $token = '')
|
||||
{
|
||||
Log::instance()->add(Log::NOTICE, __('Sending letter with subject "%subject" to address %address', array('%subject' => $subject, '%address' => $address)));
|
||||
$sender = Kohana::$config->load('email')->get('sender');
|
||||
$email = Email::factory($subject, $text)->to($address)->from($sender);
|
||||
$email = Email::factory($subject, $text)->from($sender[0], $sender[1]);
|
||||
if (is_array($address))
|
||||
{
|
||||
$email->bcc($address);
|
||||
}
|
||||
else
|
||||
{
|
||||
$email->to($address);
|
||||
}
|
||||
return $email->send();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,5 +35,6 @@ return array(
|
|||
'View' => 'Просмотреть',
|
||||
'Message subject' => 'Тема письма',
|
||||
'The password was successfully changed.' => 'Пароль был успешно изменён.',
|
||||
'Total subscription count' => 'Всего подписок'
|
||||
'Total subscription count' => 'Всего подписок',
|
||||
'Sending letter with subject "%subject" to address %address' => 'Отсылаю письмо с темой %subject на адрес %address'
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue