Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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.
Synopsis
- data SendEmail = SendEmail' {}
- newSendEmail :: Destination -> EmailContent -> SendEmail
- sendEmail_fromEmailAddress :: Lens' SendEmail (Maybe Text)
- sendEmail_configurationSetName :: Lens' SendEmail (Maybe Text)
- sendEmail_emailTags :: Lens' SendEmail (Maybe [MessageTag])
- sendEmail_feedbackForwardingEmailAddress :: Lens' SendEmail (Maybe Text)
- sendEmail_replyToAddresses :: Lens' SendEmail (Maybe [Text])
- sendEmail_destination :: Lens' SendEmail Destination
- sendEmail_content :: Lens' SendEmail EmailContent
- data SendEmailResponse = SendEmailResponse' {
- messageId :: Maybe Text
- httpStatus :: Int
- newSendEmailResponse :: Int -> SendEmailResponse
- sendEmailResponse_messageId :: Lens' SendEmailResponse (Maybe Text)
- sendEmailResponse_httpStatus :: Lens' SendEmailResponse Int
Creating a Request
A request to send an email message.
See: newSendEmail
smart constructor.
SendEmail' | |
|
Instances
Create a value of SendEmail
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:fromEmailAddress:SendEmail'
, sendEmail_fromEmailAddress
- The email address that you want to use as the "From" address for the
email. The address that you specify has to be verified.
$sel:configurationSetName:SendEmail'
, sendEmail_configurationSetName
- The name of the configuration set that you want to use when sending the
email.
$sel:emailTags:SendEmail'
, sendEmail_emailTags
- A list of tags, in the form of name/value pairs, to apply to an email
that you send using the SendEmail
operation. Tags correspond to
characteristics of the email that you define, so that you can publish
email sending events.
$sel:feedbackForwardingEmailAddress:SendEmail'
, sendEmail_feedbackForwardingEmailAddress
- The address that Amazon Pinpoint should send bounce and complaint
notifications to.
$sel:replyToAddresses:SendEmail'
, sendEmail_replyToAddresses
- The "Reply-to" email addresses for the message. When the recipient
replies to the message, each Reply-to address receives the reply.
$sel:destination:SendEmail'
, sendEmail_destination
- An object that contains the recipients of the email message.
$sel:content:SendEmail'
, sendEmail_content
- An object that contains the body of the message. You can send either a
Simple message or a Raw message.
Request Lenses
sendEmail_fromEmailAddress :: Lens' SendEmail (Maybe Text) Source #
The email address that you want to use as the "From" address for the email. The address that you specify has to be verified.
sendEmail_configurationSetName :: Lens' SendEmail (Maybe Text) Source #
The name of the configuration set that you want to use when sending the email.
sendEmail_emailTags :: Lens' SendEmail (Maybe [MessageTag]) Source #
A list of tags, in the form of name/value pairs, to apply to an email
that you send using the SendEmail
operation. Tags correspond to
characteristics of the email that you define, so that you can publish
email sending events.
sendEmail_feedbackForwardingEmailAddress :: Lens' SendEmail (Maybe Text) Source #
The address that Amazon Pinpoint should send bounce and complaint notifications to.
sendEmail_replyToAddresses :: Lens' SendEmail (Maybe [Text]) Source #
The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.
sendEmail_destination :: Lens' SendEmail Destination Source #
An object that contains the recipients of the email message.
sendEmail_content :: Lens' SendEmail EmailContent Source #
An object that contains the body of the message. You can send either a Simple message or a Raw message.
Destructuring the Response
data SendEmailResponse Source #
A unique message ID that you receive when Amazon Pinpoint accepts an email for sending.
See: newSendEmailResponse
smart constructor.
SendEmailResponse' | |
|
Instances
Create a value of SendEmailResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:messageId:SendEmailResponse'
, sendEmailResponse_messageId
- A unique identifier for the message that is generated when Amazon
Pinpoint accepts the message.
It is possible for Amazon Pinpoint to accept a message without sending it. This can happen when the message you're trying to send has an attachment doesn't pass a virus check, or when you send a templated email that contains invalid personalization content, for example.
$sel:httpStatus:SendEmailResponse'
, sendEmailResponse_httpStatus
- The response's http status code.
Response Lenses
sendEmailResponse_messageId :: Lens' SendEmailResponse (Maybe Text) Source #
A unique identifier for the message that is generated when Amazon Pinpoint accepts the message.
It is possible for Amazon Pinpoint to accept a message without sending it. This can happen when the message you're trying to send has an attachment doesn't pass a virus check, or when you send a templated email that contains invalid personalization content, for example.
sendEmailResponse_httpStatus :: Lens' SendEmailResponse Int Source #
The response's http status code.