method public static

User::onEmailReceived()

Класс: \Bitrix\Mail\User

Сигнатура

public static onEmailReceived(string $to, array<string|int, mixed> $message, mixed $recipient, mixed $userRelation, string &$error) : bool

Описание

Отправляет события, связанные с электронной почтой

Параметры

$to string
Email получателя.
$message array<string|int, mixed>
Сообщение.
$recipient mixed
$userRelation mixed
$error string
Ошибка.

Возвращаемое значение

bool

Как применяется в User

User::onEmailReceived() — метод класса \Bitrix\Mail\User модуля «Почта».

Статический метод — вызывается через имя класса User, без создания объекта.

use Bitrix\Main\Loader;
use Bitrix\Mail\User;

Loader::includeModule('mail');

$to = '';
$message = [];
$recipient = null;
$userRelation = null;
$error = '';
$result = User::onEmailReceived($to, $message, $recipient, $userRelation, $error);
// $result: bool

Другие методы User

Исходный файл: source/mail/lib/user.php:278

Что будем искать? Например,Продвижение