libZSservicesZSamazonka-pinpoint-emailZSamazonka-pinpoint-email
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.PinpointEmail.SendEmail

Description

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

Creating a Request

data SendEmail Source #

A request to send an email message.

See: newSendEmail smart constructor.

Constructors

SendEmail' 

Fields

  • fromEmailAddress :: Maybe Text

    The email address that you want to use as the "From" address for the email. The address that you specify has to be verified.

  • configurationSetName :: Maybe Text

    The name of the configuration set that you want to use when sending the email.

  • emailTags :: Maybe [MessageTag]

    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.

  • feedbackForwardingEmailAddress :: Maybe Text

    The address that Amazon Pinpoint should send bounce and complaint notifications to.

  • replyToAddresses :: Maybe [Text]

    The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.

  • destination :: Destination

    An object that contains the recipients of the email message.

  • content :: EmailContent

    An object that contains the body of the message. You can send either a Simple message or a Raw message.

Instances

Instances details
Eq SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Read SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Show SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Generic SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Associated Types

type Rep SendEmail :: Type -> Type #

NFData SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Methods

rnf :: SendEmail -> () #

Hashable SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

ToJSON SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

AWSRequest SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Associated Types

type AWSResponse SendEmail #

ToHeaders SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Methods

toHeaders :: SendEmail -> [Header] #

ToPath SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

ToQuery SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

type Rep SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

type Rep SendEmail = D1 ('MetaData "SendEmail" "Amazonka.PinpointEmail.SendEmail" "libZSservicesZSamazonka-pinpoint-emailZSamazonka-pinpoint-email" 'False) (C1 ('MetaCons "SendEmail'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "fromEmailAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "configurationSetName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "emailTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [MessageTag])))) :*: ((S1 ('MetaSel ('Just "feedbackForwardingEmailAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "replyToAddresses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "destination") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Destination) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 EmailContent)))))
type AWSResponse SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

newSendEmail Source #

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.

Constructors

SendEmailResponse' 

Fields

  • messageId :: Maybe Text

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Read SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Show SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Generic SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Associated Types

type Rep SendEmailResponse :: Type -> Type #

NFData SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Methods

rnf :: SendEmailResponse -> () #

type Rep SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

type Rep SendEmailResponse = D1 ('MetaData "SendEmailResponse" "Amazonka.PinpointEmail.SendEmail" "libZSservicesZSamazonka-pinpoint-emailZSamazonka-pinpoint-email" 'False) (C1 ('MetaCons "SendEmailResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "messageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newSendEmailResponse Source #

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.