| 1 | |||
| 2 | package Paws::SES::SendEmail; | ||
| 3 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | has ConfigurationSetName => (is => 'ro', isa => 'Str'); | |
| 5 | 2 | has Destination => (is => 'ro', isa => 'Paws::SES::Destination', required => 1); | |
| 6 | 2 | has Message => (is => 'ro', isa => 'Paws::SES::Message', required => 1); | |
| 7 | 2 | has ReplyToAddresses => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | |
| 8 | 2 | has ReturnPath => (is => 'ro', isa => 'Str'); | |
| 9 | 2 | has ReturnPathArn => (is => 'ro', isa => 'Str'); | |
| 10 | 2 | has Source => (is => 'ro', isa => 'Str', required => 1); | |
| 11 | 2 | has SourceArn => (is => 'ro', isa => 'Str'); | |
| 12 | 2 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::SES::MessageTag]'); | |
| 13 | |||
| 14 | 2 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 2 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'SendEmail'); | |
| 17 | 2 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SES::SendEmailResponse'); | |
| 18 | 2 | class_has _result_key => (isa => 'Str', is => 'ro', default => 'SendEmailResult'); | |
| 19 | 2 | 1; | |
| 20 | |||
| 21 | ### main pod documentation begin ### | ||
| 22 | |||
| 23 | =head1 NAME | ||
| 24 | |||
| 25 | Paws::SES::SendEmail - Arguments for method SendEmail on L<Paws::SES> | ||
| 26 | |||
| 27 | =head1 DESCRIPTION | ||
| 28 | |||
| 29 | This class represents the parameters used for calling the method SendEmail on the | ||
| 30 | L<Amazon Simple Email Service|Paws::SES> service. Use the attributes of this class | ||
| 31 | as arguments to method SendEmail. | ||
| 32 | |||
| 33 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to SendEmail. | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | my $email = Paws->service('SES'); | ||
| 38 | # SendEmail | ||
| 39 | # The following example sends a formatted email: | ||
| 40 | my $SendEmailResponse = $email->SendEmail( | ||
| 41 | 'Destination' => { | ||
| 42 | 'BccAddresses' => [ | ||
| 43 | |||
| 44 | ], | ||
| 45 | 'CcAddresses' => ['recipient3@example.com'], | ||
| 46 | 'ToAddresses' => [ 'recipient1@example.com', 'recipient2@example.com' ] | ||
| 47 | }, | ||
| 48 | 'Message' => { | ||
| 49 | 'Body' => { | ||
| 50 | 'Html' => { | ||
| 51 | 'Charset' => 'UTF-8', | ||
| 52 | 'Data' => | ||
| 53 | 'This message body contains HTML formatting. It can, for example, contain links like this one: <a class="ulink" href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide" target="_blank">Amazon SES Developer Guide</a>.' | ||
| 54 | }, | ||
| 55 | 'Text' => { | ||
| 56 | 'Charset' => 'UTF-8', | ||
| 57 | 'Data' => 'This is the message body in text format.' | ||
| 58 | } | ||
| 59 | }, | ||
| 60 | 'Subject' => { | ||
| 61 | 'Charset' => 'UTF-8', | ||
| 62 | 'Data' => 'Test email' | ||
| 63 | } | ||
| 64 | }, | ||
| 65 | 'ReplyToAddresses' => [ | ||
| 66 | |||
| 67 | ], | ||
| 68 | 'ReturnPath' => '', | ||
| 69 | 'ReturnPathArn' => '', | ||
| 70 | 'Source' => 'sender@example.com', | ||
| 71 | 'SourceArn' => '' | ||
| 72 | ); | ||
| 73 | |||
| 74 | # Results: | ||
| 75 | my $MessageId = $SendEmailResponse->MessageId; | ||
| 76 | |||
| 77 | # Returns a L<Paws::SES::SendEmailResponse> object. | ||
| 78 | |||
| 79 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 80 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/email/SendEmail> | ||
| 81 | |||
| 82 | =head1 ATTRIBUTES | ||
| 83 | |||
| 84 | |||
| 85 | =head2 ConfigurationSetName => Str | ||
| 86 | |||
| 87 | The name of the configuration set to use when you send an email using | ||
| 88 | C<SendEmail>. | ||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | =head2 B<REQUIRED> Destination => L<Paws::SES::Destination> | ||
| 93 | |||
| 94 | The destination for this email, composed of To:, CC:, and BCC: fields. | ||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | =head2 B<REQUIRED> Message => L<Paws::SES::Message> | ||
| 99 | |||
| 100 | The message to be sent. | ||
| 101 | |||
| 102 | |||
| 103 | |||
| 104 | =head2 ReplyToAddresses => ArrayRef[Str|Undef] | ||
| 105 | |||
| 106 | The reply-to email address(es) for the message. If the recipient | ||
| 107 | replies to the message, each reply-to address will receive the reply. | ||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | =head2 ReturnPath => Str | ||
| 112 | |||
| 113 | The email address that bounces and complaints will be forwarded to when | ||
| 114 | feedback forwarding is enabled. If the message cannot be delivered to | ||
| 115 | the recipient, then an error message will be returned from the | ||
| 116 | recipient's ISP; this message will then be forwarded to the email | ||
| 117 | address specified by the C<ReturnPath> parameter. The C<ReturnPath> | ||
| 118 | parameter is never overwritten. This email address must be either | ||
| 119 | individually verified with Amazon SES, or from a domain that has been | ||
| 120 | verified with Amazon SES. | ||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | =head2 ReturnPathArn => Str | ||
| 125 | |||
| 126 | This parameter is used only for sending authorization. It is the ARN of | ||
| 127 | the identity that is associated with the sending authorization policy | ||
| 128 | that permits you to use the email address specified in the | ||
| 129 | C<ReturnPath> parameter. | ||
| 130 | |||
| 131 | For example, if the owner of C<example.com> (which has ARN | ||
| 132 | C<arn:aws:ses:us-east-1:123456789012:identity/example.com>) attaches a | ||
| 133 | policy to it that authorizes you to use C<feedback@example.com>, then | ||
| 134 | you would specify the C<ReturnPathArn> to be | ||
| 135 | C<arn:aws:ses:us-east-1:123456789012:identity/example.com>, and the | ||
| 136 | C<ReturnPath> to be C<feedback@example.com>. | ||
| 137 | |||
| 138 | For more information about sending authorization, see the Amazon SES | ||
| 139 | Developer Guide | ||
| 140 | (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). | ||
| 141 | |||
| 142 | |||
| 143 | |||
| 144 | =head2 B<REQUIRED> Source => Str | ||
| 145 | |||
| 146 | The email address that is sending the email. This email address must be | ||
| 147 | either individually verified with Amazon SES, or from a domain that has | ||
| 148 | been verified with Amazon SES. For information about verifying | ||
| 149 | identities, see the Amazon SES Developer Guide | ||
| 150 | (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). | ||
| 151 | |||
| 152 | If you are sending on behalf of another user and have been permitted to | ||
| 153 | do so by a sending authorization policy, then you must also specify the | ||
| 154 | C<SourceArn> parameter. For more information about sending | ||
| 155 | authorization, see the Amazon SES Developer Guide | ||
| 156 | (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). | ||
| 157 | |||
| 158 | Amazon SES does not support the SMTPUTF8 extension, as described in | ||
| 159 | RFC6531 (https://tools.ietf.org/html/rfc6531). For this reason, the | ||
| 160 | I<local part> of a source email address (the part of the email address | ||
| 161 | that precedes the @ sign) may only contain 7-bit ASCII characters | ||
| 162 | (https://en.wikipedia.org/wiki/Email_address#Local-part). If the | ||
| 163 | I<domain part> of an address (the part after the @ sign) contains | ||
| 164 | non-ASCII characters, they must be encoded using Punycode, as described | ||
| 165 | in RFC3492 (https://tools.ietf.org/html/rfc3492.html). The sender name | ||
| 166 | (also known as the I<friendly name>) may contain non-ASCII characters. | ||
| 167 | These characters must be encoded using MIME encoded-word syntax, as | ||
| 168 | described in RFC 2047 (https://tools.ietf.org/html/rfc2047). MIME | ||
| 169 | encoded-word syntax uses the following form: | ||
| 170 | C<=?charset?encoding?encoded-text?=>. | ||
| 171 | |||
| 172 | |||
| 173 | |||
| 174 | =head2 SourceArn => Str | ||
| 175 | |||
| 176 | This parameter is used only for sending authorization. It is the ARN of | ||
| 177 | the identity that is associated with the sending authorization policy | ||
| 178 | that permits you to send for the email address specified in the | ||
| 179 | C<Source> parameter. | ||
| 180 | |||
| 181 | For example, if the owner of C<example.com> (which has ARN | ||
| 182 | C<arn:aws:ses:us-east-1:123456789012:identity/example.com>) attaches a | ||
| 183 | policy to it that authorizes you to send from C<user@example.com>, then | ||
| 184 | you would specify the C<SourceArn> to be | ||
| 185 | C<arn:aws:ses:us-east-1:123456789012:identity/example.com>, and the | ||
| 186 | C<Source> to be C<user@example.com>. | ||
| 187 | |||
| 188 | For more information about sending authorization, see the Amazon SES | ||
| 189 | Developer Guide | ||
| 190 | (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html). | ||
| 191 | |||
| 192 | |||
| 193 | |||
| 194 | =head2 Tags => ArrayRef[L<Paws::SES::MessageTag>] | ||
| 195 | |||
| 196 | A list of tags, in the form of name/value pairs, to apply to an email | ||
| 197 | that you send using C<SendEmail>. Tags correspond to characteristics of | ||
| 198 | the email that you define, so that you can publish email sending | ||
| 199 | events. | ||
| 200 | |||
| 201 | |||
| 202 | |||
| 203 | |||
| 204 | =head1 SEE ALSO | ||
| 205 | |||
| 206 | This class forms part of L<Paws>, documenting arguments for method SendEmail in L<Paws::SES> | ||
| 207 | |||
| 208 | =head1 BUGS and CONTRIBUTIONS | ||
| 209 | |||
| 210 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 211 | |||
| 212 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 213 | |||
| 214 | =cut | ||
| 215 | |||