S
S
Sergey2015-07-13 16:30:51
API
Sergey, 2015-07-13 16:30:51

How to add an email without confirmation?

$subscriber[] = array('email' => array("email" => "[email protected]", "euid" => "", "leid" => ""), 'email_type'=>'html', 'merge_vars'=>array('FNAME'=>'Usario1',    'LNAME'=>'Apellido1'));

I add an email to the list, but it is not added until you confirm. I didn't find the required field anywhere. When manually adding, you can indicate that the user already agrees to the mailing list I
use this library

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2015-07-13
@gangstarcj

At the time I did this:

<цикл>
$users[] = array(
        'email'      => array(
          'email' => $row['user_email']
        ),
        'merge_vars' => array(
          'FNAME' => $row['full_name'],
          'LNAME' => $row['last_name']
        )
      );
</цикл>
$result = $mc->lists->batchSubscribe(
    $list_id,
    $users,
    false, //do not send confirmation e-mail
    true //update profile in case of already added e-mail
  );

As far as I understand, the matter is in the third parameter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question