A
A
Alexander2021-07-06 12:59:50
1C-Bitrix
Alexander, 2021-07-06 12:59:50

Write name to marketing email list?

There is an email marketing module, in which you can add a user and email him for mailing.
https://yadi.sk/i/zNH6CqwK7fjbcA

How to set a name via API?

$EMAIL = '[email protected]';
$NAME = 'Имя';
            
$aParams = array(
                'EMAIL' => $EMAIL,
                'NAME' => $NAME,
                'SUBSCRIBE_LIST' => array(1)
            );
 \Bitrix\Sender\Subscription::subscribe($aParams);


email is added but name is not.
I tried instead of NAME - USER did not work out either, I need to pick it up somehow, as I understood the name.
Can anyone come across?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-07-06
@kikher

Only one thing was missing: the desire to solve the problem!
Have you tried looking at the method Subscription::subscribe? I think if they tried, they would see that only EMAIL is accepted as an identifier, and then a contact is searched for or created through the ContactTable class in which you can just specify a name (after adding a subscription).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question