CreateDeliverabilityTestReportCommand

Create a new predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will be handled by various email providers around the world. When you perform a predictive inbox placement test, you provide a sample message that contains the content that you plan to send to your customers. Amazon SES then sends that message to special email addresses spread across several major email providers. After about 24 hours, the test is complete, and you can use the GetDeliverabilityTestReport operation to view the results of the test.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SESv2Client, CreateDeliverabilityTestReportCommand } from "@aws-sdk/client-sesv2"; // ES Modules import
// const { SESv2Client, CreateDeliverabilityTestReportCommand } = require("@aws-sdk/client-sesv2"); // CommonJS import
const client = new SESv2Client(config);
const input = { // CreateDeliverabilityTestReportRequest
  ReportName: "STRING_VALUE",
  FromEmailAddress: "STRING_VALUE", // required
  Content: { // EmailContent
    Simple: { // Message
      Subject: { // Content
        Data: "STRING_VALUE", // required
        Charset: "STRING_VALUE",
      },
      Body: { // Body
        Text: {
          Data: "STRING_VALUE", // required
          Charset: "STRING_VALUE",
        },
        Html: {
          Data: "STRING_VALUE", // required
          Charset: "STRING_VALUE",
        },
      },
      Headers: [ // MessageHeaderList
        { // MessageHeader
          Name: "STRING_VALUE", // required
          Value: "STRING_VALUE", // required
        },
      ],
    },
    Raw: { // RawMessage
      Data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")       // required
    },
    Template: { // Template
      TemplateName: "STRING_VALUE",
      TemplateArn: "STRING_VALUE",
      TemplateContent: { // EmailTemplateContent
        Subject: "STRING_VALUE",
        Text: "STRING_VALUE",
        Html: "STRING_VALUE",
      },
      TemplateData: "STRING_VALUE",
      Headers: [
        {
          Name: "STRING_VALUE", // required
          Value: "STRING_VALUE", // required
        },
      ],
    },
  },
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE", // required
    },
  ],
};
const command = new CreateDeliverabilityTestReportCommand(input);
const response = await client.send(command);
// { // CreateDeliverabilityTestReportResponse
//   ReportId: "STRING_VALUE", // required
//   DeliverabilityTestStatus: "IN_PROGRESS" || "COMPLETED", // required
// };

CreateDeliverabilityTestReportCommand Input

Parameter
Type
Description
Content
Required
EmailContent | undefined

The HTML body of the message that you sent when you performed the predictive inbox placement test.

FromEmailAddress
Required
string | undefined

The email address that the predictive inbox placement test email was sent from.

ReportName
string | undefined

A unique name that helps you to identify the predictive inbox placement test when you retrieve the results.

Tags
Tag[] | undefined

An array of objects that define the tags (keys and values) that you want to associate with the predictive inbox placement test.

CreateDeliverabilityTestReportCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
DeliverabilityTestStatus
Required
DeliverabilityTestStatus | undefined

The status of the predictive inbox placement test. If the status is IN_PROGRESS, then the predictive inbox placement test is currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the test. If the status is COMPLETE, then the test is finished, and you can use the GetDeliverabilityTestReport to view the results of the test.

ReportId
Required
string | undefined

A unique string that identifies the predictive inbox placement test.

Throws

Name
Fault
Details
AccountSuspendedException
client

The message can't be sent because the account's ability to send email has been permanently restricted.

BadRequestException
client

The input you provided is invalid.

ConcurrentModificationException
server

The resource is being modified by another operation or thread.

LimitExceededException
client

There are too many instances of the specified resource type.

MailFromDomainNotVerifiedException
client

The message can't be sent because the sending domain isn't verified.

MessageRejected
client

The message can't be sent because it contains invalid content.

NotFoundException
client

The resource you attempted to access doesn't exist.

SendingPausedException
client

The message can't be sent because the account's ability to send email is currently paused.

TooManyRequestsException
client

Too many requests have been made to the operation.

SESv2ServiceException
Base exception class for all service exceptions from SESv2 service.