Start an Email Send Definition Test Send

This page contains information about starting a test send using an email send definition.

An email send definition test send allows you to see the results of an email message sent via an email send definition before sending it to a larger subscriber audience.

You can conduct a test send using the SOAP API or include AMPscript as part of your email send definition to create a test send for that email send definition.The sample code on this page is equivalent to clicking the Test Send button in email send definition. This sends the designated email to the test audience designated in the email send definition. You need a test audience defined in addition to the send audience for this code to work.Not all sendable objects can be used for test sends.

This test lets you evaluate and modify your message as necessary before sending it to the intended recipients.

Use the sample code below as a model for your own code to build the test send. The first SOAP envelope creates the email send definition, while the second SOAP envelope performs the test itself. Note that you need the IsTestObject property set to true in order to conduct the test send. Once you have completed this step, you can start the test.

Use the sample code below as a model to create your own calls.

Use the sample AMPscript call below to start a test send using an email send definition:

SET @statcode = InvokePerform(@esd,"test",@statusperform)

The sample AMPscript call uses the following variables:

  • @esd - The API object to be performed (in this case, the EmailSendDefinition object)
  • "test" - The action to be performed (in this case, "test" refers to starting a test send)
  • @statusperform - The output parameter that returns the API status message
  • @statcode - The return value of the InvokePerform function (in this case, the API status code)

You can control whether the call to an email send definition is a test send or a regular send by changing the action in the call. If you specify "test", the call goes out as a test send. If you specify "start", the call goes out as a regular send.