سؤال

Once I've identified identified the email addresses of my list segment (using get_emails() custom function, I am setting up my list segment as follows:

    $batch = get_emails();
    //now create my list segment:
    $api->listStaticSegmentAdd(WEDDING_LIST_ID, 'new_wedding_guests');
    $api->listStaticSegmentMembersAdd(WEDDING_LIST_ID, 'new_wedding_guests', $batch);
    //do I build vars for a campaign?
    $options = array (
      'list_id' => WEDDING_LIST_ID, //What value id's my list segment?
      'subject' => 'Alpha testing.',
      'from_email' => 'wedding@juicywatermelon.com',
      'from_name' => 'Pam & Kellzo',
      'to_name' => $account->name,   
    );

From here can I use a basic campaign and send it?

    $content['text'] = "Some text.";
    $content['html'] = get_link($account);
    $cid = $api->campaignCreate('regular', $options, $content); 
    $result = $api->campaignSendNow($cid);

I'm not sure if I'm understanding the api documentation correctly. I also tried 'list_id' => 'new_wedding_guests'; which failed to create a campaign.

Thanks!

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top