amazonka-pinpoint-email-2.0: Amazon Pinpoint Email Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

  • 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.

  • 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.

  • 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
ToJSON SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.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

AWSRequest SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Associated Types

type AWSResponse SendEmail #

Generic SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Associated Types

type Rep SendEmail :: Type -> Type #

Read SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Show SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

NFData SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Methods

rnf :: SendEmail -> () #

Eq SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Hashable SendEmail Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

type AWSResponse 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" "amazonka-pinpoint-email-2.0-EgVsRBIHQXMGA9Xbyu2BvI" 'False) (C1 ('MetaCons "SendEmail'" 'PrefixI 'True) ((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 "fromEmailAddress") '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)))))

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: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.

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: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_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_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_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
Generic SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Associated Types

type Rep SendEmailResponse :: Type -> Type #

Read SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Show SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

NFData SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

Methods

rnf :: SendEmailResponse -> () #

Eq SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

type Rep SendEmailResponse Source # 
Instance details

Defined in Amazonka.PinpointEmail.SendEmail

type Rep SendEmailResponse = D1 ('MetaData "SendEmailResponse" "Amazonka.PinpointEmail.SendEmail" "amazonka-pinpoint-email-2.0-EgVsRBIHQXMGA9Xbyu2BvI" '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.