Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
actionemail.php
1
<?php
9
namespace
Bitrix\Main\EventLog
;
10
11
class
ActionEmail
extends
Action
12
{
13
const
EVENT_TYPE
=
'EVENT_LOG_NOTIFICATION'
;
14
15
public
function
__construct
(
$recipient
,
$text
)
16
{
17
parent::__construct(
Action::TYPE_EMAIL
,
$recipient
,
$text
);
18
}
19
23
public
function
send
(
Notification
$notification)
24
{
25
$site = \CSite::GetDefSite();
26
27
$fields = static::getNotificationFields($notification);
28
$fields[
"EMAIL"
] = $this->
getRecipient
();
29
$fields[
"ADDITIONAL_TEXT"
] = $this->
getText
();
30
31
\Bitrix\Main\Mail\Event::send([
32
'EVENT_NAME'
=> self::EVENT_TYPE,
33
'C_FIELDS'
=> $fields,
34
'LID'
=> $site,
35
]);
36
}
37
}
Bitrix\Main\EventLog\ActionEmail
Definition
actionemail.php:12
Bitrix\Main\EventLog\ActionEmail\EVENT_TYPE
const EVENT_TYPE
Definition
actionemail.php:13
Bitrix\Main\EventLog\ActionEmail\send
send(Notification $notification)
Definition
actionemail.php:23
Bitrix\Main\EventLog\ActionEmail\__construct
__construct($recipient, $text)
Definition
actionemail.php:15
Bitrix\Main\EventLog\Action
Definition
action.php:12
Bitrix\Main\EventLog\Action\getRecipient
getRecipient()
Definition
action.php:67
Bitrix\Main\EventLog\Action\getText
getText()
Definition
action.php:76
Bitrix\Main\EventLog\Action\TYPE_EMAIL
const TYPE_EMAIL
Definition
action.php:13
Bitrix\Main\EventLog\Action\$recipient
$recipient
Definition
action.php:17
Bitrix\Main\EventLog\Action\$text
$text
Definition
action.php:18
Bitrix\Main\EventLog\Notification
Definition
notification.php:43
Bitrix\Main\EventLog
Definition
action.php:9
modules
main
lib
eventlog
actionemail.php
Создано системой
1.10.0