Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
Composes an email message to multiple destinations. The message body is created using an email template.
In order to send email using the SendBulkTemplatedEmail
operation, your call to the API must meet the following requirements:
- The call must refer to an existing email template. You can create email templates using the
CreateTemplate
operation. - The message must be sent from a verified email address or domain.
- If your account is still in the Amazon SES sandbox, you may only send to verified addresses or domains, or to email addresses associated with the Amazon SES Mailbox Simulator. For more information, see Verifying Email Addresses and Domains in the Amazon SES Developer Guide.
- The total size of the message, including attachments, must be less than 10 MB.
- Each
Destination
parameter must include at least one recipient email address. The recipient address can be a To: address, a CC: address, or a BCC: address. If a recipient email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain ), the entire message will be rejected, even if the message contains other recipients that are valid.
- sendBulkTemplatedEmail :: Text -> Text -> SendBulkTemplatedEmail
- data SendBulkTemplatedEmail
- sbteReturnPath :: Lens' SendBulkTemplatedEmail (Maybe Text)
- sbteConfigurationSetName :: Lens' SendBulkTemplatedEmail (Maybe Text)
- sbteSourceARN :: Lens' SendBulkTemplatedEmail (Maybe Text)
- sbteDefaultTags :: Lens' SendBulkTemplatedEmail [MessageTag]
- sbteReturnPathARN :: Lens' SendBulkTemplatedEmail (Maybe Text)
- sbteTemplateARN :: Lens' SendBulkTemplatedEmail (Maybe Text)
- sbteDefaultTemplateData :: Lens' SendBulkTemplatedEmail (Maybe Text)
- sbteReplyToAddresses :: Lens' SendBulkTemplatedEmail [Text]
- sbteSource :: Lens' SendBulkTemplatedEmail Text
- sbteTemplate :: Lens' SendBulkTemplatedEmail Text
- sbteDestinations :: Lens' SendBulkTemplatedEmail [BulkEmailDestination]
- sendBulkTemplatedEmailResponse :: Int -> SendBulkTemplatedEmailResponse
- data SendBulkTemplatedEmailResponse
- sbtersResponseStatus :: Lens' SendBulkTemplatedEmailResponse Int
- sbtersStatus :: Lens' SendBulkTemplatedEmailResponse [BulkEmailDestinationStatus]
Creating a Request
sendBulkTemplatedEmail Source #
Creates a value of SendBulkTemplatedEmail
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sbteReturnPath
- The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by theReturnPath
parameter. TheReturnPath
parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.sbteConfigurationSetName
- The name of the configuration set to use when you send an email usingSendBulkTemplatedEmail
.sbteSourceARN
- This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in theSource
parameter. For example, if the owner ofexample.com
(which has ARNarn:aws:ses:us-east-1:123456789012:identity/example.com
) attaches a policy to it that authorizes you to send fromuser
example.com, then you would specify the
SourceArnto be
arn:aws:ses:us-east-1:123456789012:identityexample.com, and the
Sourceto be
userexample.com
. For more information about sending authorization, see the <http:docs.aws.amazon.comseslatestDeveloperGuide/sending-authorization.html Amazon SES Developer Guide> .sbteDefaultTags
- A list of tags, in the form of name/value pairs, to apply to an email that you send to a destination usingSendBulkTemplatedEmail
.sbteReturnPathARN
- This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in theReturnPath
parameter. For example, if the owner ofexample.com
(which has ARNarn:aws:ses:us-east-1:123456789012:identity/example.com
) attaches a policy to it that authorizes you to usefeedback
example.com, then you would specify the
ReturnPathArnto be
arn:aws:ses:us-east-1:123456789012:identityexample.com, and the
ReturnPathto be
feedbackexample.com
. For more information about sending authorization, see the <http:docs.aws.amazon.comseslatestDeveloperGuide/sending-authorization.html Amazon SES Developer Guide> .sbteTemplateARN
- The ARN of the template to use when sending this email.sbteDefaultTemplateData
- A list of replacement values to apply to the template when replacement data is not specified in a Destination object. These values act as a default or fallback option when no other data is available. The template data is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.sbteReplyToAddresses
- The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.sbteSource
- The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the Amazon SES Developer Guide . If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify theSourceArn
parameter. For more information about sending authorization, see the Amazon SES Developer Guide .sbteTemplate
- The template to use when sending this email.sbteDestinations
- One or moreDestination
objects. All of the recipients in aDestination
will receive the same version of the email. You can specify up to 50Destination
objects within aDestinations
array.
data SendBulkTemplatedEmail Source #
Represents a request to send a templated email to multiple destinations using Amazon SES. For more information, see the Amazon SES Developer Guide .
See: sendBulkTemplatedEmail
smart constructor.
Request Lenses
sbteReturnPath :: Lens' SendBulkTemplatedEmail (Maybe Text) Source #
The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled. If the message cannot be delivered to the recipient, then an error message will be returned from the recipient's ISP; this message will then be forwarded to the email address specified by the ReturnPath
parameter. The ReturnPath
parameter is never overwritten. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.
sbteConfigurationSetName :: Lens' SendBulkTemplatedEmail (Maybe Text) Source #
The name of the configuration set to use when you send an email using SendBulkTemplatedEmail
.
sbteSourceARN :: Lens' SendBulkTemplatedEmail (Maybe Text) Source #
This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to send for the email address specified in the Source
parameter. For example, if the owner of example.com
(which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com
) attaches a policy to it that authorizes you to send from user
example.com , then you would specify the
SourceArn to be
arn:aws:ses:us-east-1:123456789012:identityexample.com , and the
Source to be
userexample.com
. For more information about sending authorization, see the <http:docs.aws.amazon.comseslatestDeveloperGuide/sending-authorization.html Amazon SES Developer Guide> .
sbteDefaultTags :: Lens' SendBulkTemplatedEmail [MessageTag] Source #
A list of tags, in the form of name/value pairs, to apply to an email that you send to a destination using SendBulkTemplatedEmail
.
sbteReturnPathARN :: Lens' SendBulkTemplatedEmail (Maybe Text) Source #
This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the ReturnPath
parameter. For example, if the owner of example.com
(which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com
) attaches a policy to it that authorizes you to use feedback
example.com , then you would specify the
ReturnPathArn to be
arn:aws:ses:us-east-1:123456789012:identityexample.com , and the
ReturnPath to be
feedbackexample.com
. For more information about sending authorization, see the <http:docs.aws.amazon.comseslatestDeveloperGuide/sending-authorization.html Amazon SES Developer Guide> .
sbteTemplateARN :: Lens' SendBulkTemplatedEmail (Maybe Text) Source #
The ARN of the template to use when sending this email.
sbteDefaultTemplateData :: Lens' SendBulkTemplatedEmail (Maybe Text) Source #
A list of replacement values to apply to the template when replacement data is not specified in a Destination object. These values act as a default or fallback option when no other data is available. The template data is a JSON object, typically consisting of key-value pairs in which the keys correspond to replacement tags in the email template.
sbteReplyToAddresses :: Lens' SendBulkTemplatedEmail [Text] Source #
The reply-to email address(es) for the message. If the recipient replies to the message, each reply-to address will receive the reply.
sbteSource :: Lens' SendBulkTemplatedEmail Text Source #
The email address that is sending the email. This email address must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES. For information about verifying identities, see the Amazon SES Developer Guide . If you are sending on behalf of another user and have been permitted to do so by a sending authorization policy, then you must also specify the SourceArn
parameter. For more information about sending authorization, see the Amazon SES Developer Guide .
sbteTemplate :: Lens' SendBulkTemplatedEmail Text Source #
The template to use when sending this email.
sbteDestinations :: Lens' SendBulkTemplatedEmail [BulkEmailDestination] Source #
One or more Destination
objects. All of the recipients in a Destination
will receive the same version of the email. You can specify up to 50 Destination
objects within a Destinations
array.
Destructuring the Response
sendBulkTemplatedEmailResponse Source #
Creates a value of SendBulkTemplatedEmailResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sbtersResponseStatus
- -- | The response status code.sbtersStatus
- The unique message identifier returned from theSendBulkTemplatedEmail
action.
data SendBulkTemplatedEmailResponse Source #
See: sendBulkTemplatedEmailResponse
smart constructor.
Response Lenses
sbtersResponseStatus :: Lens' SendBulkTemplatedEmailResponse Int Source #
- - | The response status code.
sbtersStatus :: Lens' SendBulkTemplatedEmailResponse [BulkEmailDestinationStatus] Source #
The unique message identifier returned from the SendBulkTemplatedEmail
action.