M
M
mills2019-08-29 13:14:00
1C-Bitrix
mills, 2019-08-29 13:14:00

Sending emails to all registered users, how?

Hello!
How to implement it better, can anyone do it, please share.
Implemented sending letters when creating an infoblock element, but how to implement sending letters to all registered users by e-mail?
5d67a54da5137591261694.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Alexandrov, 2019-08-30
@alexyarik

In the required event in init.php:
1) Get users CUser::GetList
2) Get EMAIL in the array
3) In CEvent::Send, example

while ($admin = $rsAdmins->Fetch()) { 
        CEvent::Send('COUNT_REGISTERED_USERS', 's1', array( 
            'EMAIL_TO' => $admin['EMAIL'], 
  .....
       ); 
    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question