Documentation

Message class methods

Sends at the end of hit

\Bitrix\MessageService\Message::send

Sends immediately

\Bitrix\MessageService\Message::sendDirectly

\$message = \Bitrix\MessageService\Sender\SmsManager::createMessage([
	'SENDER_ID' => \Bitrix\MessageService\Sender\Sms\Ednaru::ID,
	'MESSAGE_TO' => $phoneNumber,
	'MESSAGE_FROM' => $chanelId,
	'MESSAGE_BODY' => $text,
	'MESSAGE_HEADERS' => [ // parameters for the event 
		'module_id' => 'crm',
		'bindings' => [
			0 => [
				'OWNER_TYPE_ID' => 1,
				'OWNER_ID' => 57,
			],
			1 => [
				'OWNER_TYPE_ID' => 1,
				'OWNER_ID' => 57,
			],
		],
	],
]);
$message->send();
© «Bitrix24», 2001-2024
Up