You are here

public function MailchimpCampaigns::sendTest in Mailchimp 8

Sends a test email.

Parameters

string $campaign_id: The ID of the campaign.

array $test_emails: Email addresses to send the test email to.

string $send_type: The type of test email to send.

array $parameters: Associative array of optional request parameters.

bool $batch: TRUE to create a new pending batch operation.

Return value

object

See also

http://developer.mailchimp.com/documentation/mailchimp/reference/campaig...

File

lib/mailchimp-api-php/src/MailchimpCampaigns.php, line 193

Class

MailchimpCampaigns
Mailchimp Campaigns library.

Namespace

Mailchimp

Code

public function sendTest($campaign_id, $test_emails, $send_type, $parameters = [], $batch = FALSE) {
  $tokens = [
    'campaign_id' => $campaign_id,
  ];
  $parameters += [
    'test_emails' => $test_emails,
    'send_type' => $send_type,
  ];
  return $this
    ->request('POST', '/campaigns/{campaign_id}/actions/test', $tokens, $parameters, $batch);
}