Created
July 17, 2013 04:29
-
-
Save umidjons/6017706 to your computer and use it in GitHub Desktop.
Send mail in Bitrix example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| // Настройки продукта / Почтовые события / Типы почтовых событий | |
| // создаем новый тип почтового события MY_NEW_MAIL_EVENT | |
| $mailFields[ "EMAIL_FROM" ] = "no-reply@mysite.com"; | |
| $mailFields[ "EMAIL_TO" ] = "user1@domain.com,user2@other.org"; | |
| $mailFields[ "PROP_SOME_VALUE" ] = 'some text is here'; | |
| $mailFields[ "PROP_OTHER_VALUE" ] = 'some other text is here'; | |
| // Создаем новый почтовый шаблон. | |
| // ID почтового шаблона, нр, 78 | |
| // Содержимое шаблона нр, такой: | |
| /* | |
| * Тип почтового события: MY_NEW_MAIL_EVENT | |
| * От кого: #EMAIL_FROM# | |
| * Кому: #EMAIL_TO# | |
| * Тема: Моя новая события | |
| * Тип тела сообщения: HTML | |
| * Тело сообщения: | |
| * Сообщаем вам о новых продуктах типа <strong>#PROP_SOME_VALUE#</strong> | |
| * и ценой <em>#PROP_OTHER_VALUE# руб.</em> | |
| * */ | |
| CEvent::Send( "MY_NEW_MAIL_EVENT", SITE_ID, $mailFields, "N", 78 ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment