Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

sendEmailCampaignTest


The sendEmailCampaignTest() method mails a test version of the specified campaign to a specified list of recipients. Provide each recipient as a list of name/value pairs. Each recipient must contain an “email_address” name/value pair. The number of test emails is limited to 10 per call.

Input

[vrtypens:sendEmailCampaignTestArgs]

session_id [xsd:string] (required)
Your API session id.
campaign_id [xsd:int] (required)
The id of the campaign to test
recipients [vrtypens:ArrayOfNVDictionary] (required)
An array whose items are each an NVDictionary describing a test email recipient.
Each NVDictionary should at least contain an “email_address” entry.

Examples

PHP

$sect = $vr->sendEmailCampaignTest(
	array(
		'session_id' => $sid,
		'campaign_id' => $cid,
		'recipients'  => array(
			array( array(
				'name'  => "email_address",
				'value' => 'email@example.com',
			),)
		)
	)				    				     
);

Ruby

vr.sendEmailCampaignTest({
	'session_id'  => sid,
	'campaign_id' => cid,
		'recipients'  => [
			[{
			'name' => 'email_address',
			'value' => 'email@example.com'
			}],
		],
	}
)

Java

int test_recipient_data_needed = 1;
NVPair[][] recipients = new NVPair[test_recipient_data_needed][1];
int bx = 0;

NVPair[] myEmail = { new NVPair ("email_address", "email@example.com") };
recipients[bx++] = myEmail;

SendEmailCampaignTestArgs sendEmailCampaignTestArgs = new SendEmailCampaignTestArgs();
	sendEmailCampaignTestArgs.setSession_id(sessionID);
	sendEmailCampaignTestArgs.setCampaign_id(campaignID);
	sendEmailCampaignTestArgs.setRecipients(recipients);

SendEmailCampaignTestResult result;
result = vr.sendEmailCampaignTest(sendEmailCampaignTestArgs);

C#/.NET

int testRecipientDataNeeded = 1;
NVPair[][] recipients = new NVPair[testRecipientDataNeeded][];

NVPair testRecipients = new NVPair();
	testRecipients.name = "email_address";
	testRecipients.value = "email@example.com";

recipients[0] = new NVPair[] {testRecipients};

sendEmailCampaignTestArgs sECTA = new sendEmailCampaignTestArgs();
	sECTA.session_id = sessionId;
	sECTA.campaign_id = intcampaignId;
	sECTA.recipients = recipients;

try
{
	objVR.sendEmailCampaignTest(sECTA);
}
catch (Exception e)
{
	System.Console.WriteLine(e.Message);
}

Perl

$vrapi->sendEmailCampaignTest( {
	session_id => $sid,
	campaign_id => $cid,
		recipients => [
			{
			name => 'email_address',
			value => 'email@example.com'
			},
		],
	} 
);