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 Pinpoint 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.
Parameters:
-
report_name
(Optional[ReportName], default:
None
)
–
A unique name that helps you to identify the predictive inbox placement test when you retrieve the results.
-
from_email_address
(EmailAddress)
–
The email address that the predictive inbox placement test email was sent from.
-
content
(EmailContent)
–
The HTML body of the message that you sent when you performed the predictive inbox placement test.
-
tags
(Optional[TagList], default:
None
)
–
An array of objects that define the tags (keys and values) that you want to associate with the predictive inbox placement test.
Raises:
Source code in docs_src/capo_pinpoint_email/_services/pinpoint_email.py
| def create_deliverability_test_report(
self,
from_email_address: "capo_pinpoint_email.types.email_address.EmailAddress",
content: "capo_pinpoint_email.types.email_content.EmailContent",
*,
config_overrides: Optional[PinpointEmailClientConfig] = None,
report_name: Optional[
"capo_pinpoint_email.types.report_name.ReportName"
] = None,
tags: Optional["capo_pinpoint_email.types.tag_list.TagList"] = None,
) -> "capo_pinpoint_email.types.create_deliverability_test_report_response.CreateDeliverabilityTestReportResponse":
"""<p>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 Pinpoint 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 <code>GetDeliverabilityTestReport</code> operation to view the results of the test.</p>
Args:
report_name: <p>A unique name that helps you to identify the predictive inbox placement test when you retrieve the results.</p>
from_email_address: <p>The email address that the predictive inbox placement test email was sent from.</p>
content: <p>The HTML body of the message that you sent when you performed the predictive inbox placement test.</p>
tags: <p>An array of objects that define the tags (keys and values) that you want to associate with the predictive inbox placement test.</p>
Raises:
capo_pinpoint_email.errors.account_suspended_exception.AccountSuspendedException: <p>The message can't be sent because the account's ability to send email has been permanently restricted.</p>
capo_pinpoint_email.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_pinpoint_email.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource is being modified by another operation or thread.</p>
capo_pinpoint_email.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</p>
capo_pinpoint_email.errors.mail_from_domain_not_verified_exception.MailFromDomainNotVerifiedException: <p>The message can't be sent because the sending domain isn't verified.</p>
capo_pinpoint_email.errors.message_rejected.MessageRejected: <p>The message can't be sent because it contains invalid content.</p>
capo_pinpoint_email.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</p>
capo_pinpoint_email.errors.sending_paused_exception.SendingPausedException: <p>The message can't be sent because the account's ability to send email is currently paused.</p>
capo_pinpoint_email.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
capo_pinpoint_email.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_pinpoint_email.types.create_deliverability_test_report_request.CreateDeliverabilityTestReportRequest]",
) -> OperationResponse[
"capo_pinpoint_email.types.create_deliverability_test_report_response.CreateDeliverabilityTestReportResponse"
]:
import capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_deliverability_test_report
output, http_response = (
capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_deliverability_test_report.create_deliverability_test_report(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateDeliverabilityTestReport")
)
input_: capo_pinpoint_email.types.create_deliverability_test_report_request.CreateDeliverabilityTestReportRequest = {
"from_email_address": from_email_address,
"content": content,
}
if report_name is not None:
input_["report_name"] = report_name
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|