title: How to mail to a static list segment with mailchimp API
body: <p>Once I've identified identified the email addresses of my list segment (using <code>get_emails()</code> custom function, I am setting up my list segment as follows:</p>
  
  <pre><code>    $batch = get_emails();
      //now create my list segment:
      $api-&gt;listStaticSegmentAdd(WEDDING_LIST_ID, 'new_wedding_guests');
      $api-&gt;listStaticSegmentMembersAdd(WEDDING_LIST_ID, 'new_wedding_guests', $batch);
      //do I build vars for a campaign?
      $options = array (
        'list_id' =&gt; WEDDING_LIST_ID, //What value id's my list segment?
        'subject' =&gt; 'Alpha testing.',
        'from_email' =&gt; 'wedding@juicywatermelon.com',
        'from_name' =&gt; 'Pam &amp; Kellzo',
        'to_name' =&gt; $account-&gt;name,   
      );
  </code></pre>
  
  <p>From here can I use a basic campaign and send it? </p>
  
  <pre><code>    $content['text'] = "Some text.";
      $content['html'] = get_link($account);
      $cid = $api-&gt;campaignCreate('regular', $options, $content); 
      $result = $api-&gt;campaignSendNow($cid);
  </code></pre>
  
  <p>I'm not sure if I'm understanding the api documentation correctly. I also tried <code>'list_id' =&gt; 'new_wedding_guests';</code> which failed to create a campaign. </p>
  
  <p>Thanks!</p>