send_email
async
¶
send_email(
destination: Destination,
content: EmailContent,
*,
config_overrides: Optional[AsyncPinpointEmailClientConfig] = None,
from_email_address: Optional[EmailAddress] = None,
reply_to_addresses: Optional[EmailAddressList] = None,
feedback_forwarding_email_address: Optional[EmailAddress] = None,
email_tags: Optional[MessageTagList] = None,
configuration_set_name: Optional[ConfigurationSetName] = None,
) -> SendEmailResponse
Sends an email message. You can use the Amazon Pinpoint Email API to send two types of messages:
-
Simple – A standard email message. When you create this type of message, you specify the sender, the recipient, and the message body, and Amazon Pinpoint assembles the message for you.
-
Raw – A raw, MIME-formatted email message. When you send this type of email, you have to specify all of the message headers, as well as the message body. You can use this message type to send messages that contain attachments. The message that you specify has to be a valid MIME message.
Parameters:
-
from_email_address(Optional[EmailAddress], default:None) –The email address that you want to use as the "From" address for the email. The address that you specify has to be verified.
-
destination(Destination) –An object that contains the recipients of the email message.
-
reply_to_addresses(Optional[EmailAddressList], default:None) –The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.
-
feedback_forwarding_email_address(Optional[EmailAddress], default:None) –The address that Amazon Pinpoint should send bounce and complaint notifications to.
-
content(EmailContent) –An object that contains the body of the message. You can send either a Simple message or a Raw message.
-
email_tags(Optional[MessageTagList], default:None) –A list of tags, in the form of name/value pairs, to apply to an email that you send using the
SendEmailoperation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events. -
configuration_set_name(Optional[ConfigurationSetName], default:None) –The name of the configuration set that you want to use when sending the email.
Raises:
-
AccountSuspendedException–The message can't be sent because the account's ability to send email has been permanently restricted.
-
BadRequestException–The input you provided is invalid.
-
LimitExceededException–There are too many instances of the specified resource type.
-
MailFromDomainNotVerifiedException–The message can't be sent because the sending domain isn't verified.
-
MessageRejected–The message can't be sent because it contains invalid content.
-
NotFoundException–The resource you attempted to access doesn't exist.
-
SendingPausedException–The message can't be sent because the account's ability to send email is currently paused.
-
TooManyRequestsException–Too many requests have been made to the operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_pinpoint_email/_services/async_pinpoint_email.py
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 | |