bitrix-mail
Почта Битрикс: Mail\Event::send, шаблоны CEventMessage, очередь b_event, вложения и SMTP. Используй при отправке писем из кода, выборе отправителя и диагностике доставки.
How do I install this agent skill?
npx skills add https://github.com/bxmaximum/bitrix-framework-skills --skill bitrix-mailIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides technical documentation and coding guidelines for the Bitrix CMS mailing system. It covers mail events, template creation, SMTP configuration, and event hooks. The skill includes security best practices, such as preventing HTML injection in email templates and verifying user-supplied email addresses. No security risks were identified.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Почта Битрикс
Baseline: main 23.0+ · Verified: main 26.1000.0
Перед PHP-кодом прочитай bitrix-framework, если ещё не читал его в этой задаче. По таблице открой только нужный файл правил.
| Задача | Читать |
|---|---|
Типы событий, шаблоны, макросы #FIELD#, экранирование HTML | rules/templates.md |
Очередь и немедленная отправка, вложения, Mail::sendResult(), отправитель, выбор SMTP | rules/sending.md |
| События, обработка очереди и cron, тестирование, диагностика доставки | rules/hooks-testing.md |
| Подписи текста в main.mail.form, OnMailSenderListBuild | rules/signatures.md |
SMTP и секция smtp в .settings.php: bitrix-settings. Типы и шаблоны в миграциях: bitrix-sprint-migration.
Общие правила
- Отправляй почтовым событием с редактируемым шаблоном (
Mail\Event::send()). Письмо черезMail::sendResult()собирай, когда шаблон не подходит. - По умолчанию — очередь
b_event, обработка после хитов или cron.sendImmediate()— когда результат нужен вызывающему коду сразу. - Значения
C_FIELDS: строки либо массивы строк. Очередь превращает объект в(string)через__toString(), без него — в''. - Данные пользователя в HTML-шаблоне:
#HTML_FIELD#;#FIELD#вставляется без экранирования. - Проверяй пользовательские адреса (
check_email()) до подстановки вEMAIL_TO,CCи заголовки. - Шаблон должен быть привязан к сайту: создавай через
CEventMessage, неEventMessageTable::add().
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/bxmaximum/bitrix-framework-skills/bitrix-mail">View bitrix-mail on skillZs</a>