import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { SendRawEmailRequest, SendRawEmailResponse } from "../models/models_0"; import type { ServiceInputTypes, ServiceOutputTypes, SESClientResolvedConfig } from "../SESClient"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link SendRawEmailCommand}. */ export interface SendRawEmailCommandInput extends SendRawEmailRequest { } /** * @public * * The output of {@link SendRawEmailCommand}. */ export interface SendRawEmailCommandOutput extends SendRawEmailResponse, __MetadataBearer { } declare const SendRawEmailCommand_base: { new (input: SendRawEmailCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: SendRawEmailCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Composes an email message and immediately queues it for sending.

*

This operation is more flexible than the SendEmail operation. When you * use the SendRawEmail operation, you can specify the headers of the message * as well as its content. This flexibility is useful, for example, when you need to send a * multipart MIME email (such a message that contains both a text and an HTML version). You * can also use this operation to send messages that include attachments.

*

The SendRawEmail operation has the following requirements:

* *

Additionally, keep the following considerations in mind when using the * SendRawEmail operation:

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { SESClient, SendRawEmailCommand } from "@aws-sdk/client-ses"; // ES Modules import * // const { SESClient, SendRawEmailCommand } = require("@aws-sdk/client-ses"); // CommonJS import * // import type { SESClientConfig } from "@aws-sdk/client-ses"; * const config = {}; // type is SESClientConfig * const client = new SESClient(config); * const input = { // SendRawEmailRequest * Source: "STRING_VALUE", * Destinations: [ // AddressList * "STRING_VALUE", * ], * RawMessage: { // RawMessage * Data: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required * }, * FromArn: "STRING_VALUE", * SourceArn: "STRING_VALUE", * ReturnPathArn: "STRING_VALUE", * Tags: [ // MessageTagList * { // MessageTag * Name: "STRING_VALUE", // required * Value: "STRING_VALUE", // required * }, * ], * ConfigurationSetName: "STRING_VALUE", * }; * const command = new SendRawEmailCommand(input); * const response = await client.send(command); * // { // SendRawEmailResponse * // MessageId: "STRING_VALUE", // required * // }; * * ``` * * @param SendRawEmailCommandInput - {@link SendRawEmailCommandInput} * @returns {@link SendRawEmailCommandOutput} * @see {@link SendRawEmailCommandInput} for command's `input` shape. * @see {@link SendRawEmailCommandOutput} for command's `response` shape. * @see {@link SESClientResolvedConfig | config} for SESClient's `config` shape. * * @throws {@link AccountSendingPausedException} (client fault) *

Indicates that email sending is disabled for your entire Amazon SES account.

*

You can enable or disable email sending for your Amazon SES account using UpdateAccountSendingEnabled.

* * @throws {@link ConfigurationSetDoesNotExistException} (client fault) *

Indicates that the configuration set does not exist.

* * @throws {@link ConfigurationSetSendingPausedException} (client fault) *

Indicates that email sending is disabled for the configuration set.

*

You can enable or disable email sending for a configuration set using UpdateConfigurationSetSendingEnabled.

* * @throws {@link MailFromDomainNotVerifiedException} (client fault) *

Indicates that the message could not be sent because Amazon SES could not read the MX * record required to use the specified MAIL FROM domain. For information about editing the * custom MAIL FROM domain settings for an identity, see the Amazon SES Developer * Guide.

* * @throws {@link MessageRejected} (client fault) *

Indicates that the action failed, and the message could not be sent. Check the error * stack for more information about what caused the error.

* * @throws {@link SESServiceException} *

Base exception class for all service exceptions from SES service.

* * * @example SendRawEmail * ```javascript * // The following example sends an email with an attachment: * const input = { * Destinations: [], * FromArn: "", * RawMessage: { * Data: `From: sender@example.com\nTo: recipient@example.com\nSubject: Test email (contains an attachment)\nMIME-Version: 1.0\nContent-type: Multipart/Mixed; boundary="NextPart"\n\n--NextPart\nContent-Type: text/plain\n\nThis is the message body.\n\n--NextPart\nContent-Type: text/plain;\nContent-Disposition: attachment; filename="attachment.txt"\n\nThis is the text in the attachment.\n\n--NextPart--` * }, * ReturnPathArn: "", * Source: "", * SourceArn: "" * }; * const command = new SendRawEmailCommand(input); * const response = await client.send(command); * /* response is * { * MessageId: "EXAMPLEf3f73d99b-c63fb06f-d263-41f8-a0fb-d0dc67d56c07-000000" * } * *\/ * ``` * * @public */ export declare class SendRawEmailCommand extends SendRawEmailCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: SendRawEmailRequest; output: SendRawEmailResponse; }; sdk: { input: SendRawEmailCommandInput; output: SendRawEmailCommandOutput; }; }; }