What this solution does
The awz.mailtotg module integrates with the Bitrix CMS mail event processing system. It intercepts notifications before sending using the OnBeforeEventSend event handler. The compiled message from the email template is converted to a format compatible with the Telegram API and sent to a configured chat or channel. An integrated conversion system adapts HTML markup for Telegram, preserving supported formatting tags such as bold, italic, links, and code blocks. The module can be configured to completely block the original email delivery, sending notifications only to Telegram. Access to module settings is controlled via the Bitrix role-based access model. Installation is performed using the standard Bitrix mechanism, which creates the necessary database tables for storing access rights.
The module automatically registers event handlers and configures components for access control. It integrates into the existing Bitrix email notification system, operating transparently without altering its standard logic.
Configuration is performed via the Bitrix administrative interface at Settings → Module Settings → awz.mailtotg. Two mandatory parameters are required: the Telegram bot API token (TGKEY) obtained from @BotFather, and the unique chat or channel ID (TGID) for message delivery.
Behavior is configured individually for each email event type. Two modes are available: 'Active', which duplicates the notification to Telegram, and 'Blocked', where the original email is not sent and the notification is forwarded exclusively to the messenger. The interface displays a list of all active system email templates with the ability to enable or disable forwarding for each.
Access to module management is controlled by the standard Bitrix access rights system. The 'View Settings' right allows opening the configuration page, while the 'Edit Settings' right permits changing module parameters.
The access rights management module enables configuring access levels for individual users and groups.
General iT can install and configure this module and check how it works on your website.