Example #1
0
        /// <summary>
        /// <para>Sends an email message, with header and content specified by the client. The <c>SendRawEmail</c> action is useful for sending
        /// multipart MIME emails. The raw text of the message must comply with Internet email standards; otherwise, the message cannot be sent. </para>
        /// <para><b>IMPORTANT:</b> You can only send email from verified email addresses and domains. If you have not requested production access to
        /// Amazon SES, you must also verify every recipient email address except for the recipients provided by the Amazon SES mailbox simulator. For
        /// more information, go to the Amazon SES Developer Guide. </para> <para>The total size of the message cannot exceed 10 MB. This includes any
        /// attachments that are part of the message.</para> <para>Amazon SES has a limit on the total number of recipients per message: The combined
        /// number of To:, CC: and BCC: email addresses cannot exceed 50. If you need to send an email message to a larger audience, you can divide your
        /// recipient list into groups of 50 or fewer, and then call Amazon SES repeatedly to send the message to each group. </para> <para>For every
        /// message that you send, the total number of recipients (To:, CC: and BCC:) is counted against your <i>sending quota</i> - the maximum number
        /// of emails you can send in a 24-hour period. For information about your sending quota, go to the <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html">Amazon SES Developer Guide</a> .
        /// </para>
        /// </summary>
        ///
        /// <param name="sendRawEmailRequest">Container for the necessary parameters to execute the SendRawEmail service method on
        /// AmazonSimpleEmailService.</param>
        ///
        /// <returns>The response from the SendRawEmail service method, as returned by AmazonSimpleEmailService.</returns>
        ///
        /// <exception cref="T:Amazon.SimpleEmail.Model.MessageRejectedException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        public Task <SendRawEmailResponse> SendRawEmailAsync(SendRawEmailRequest sendRawEmailRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, SendRawEmailRequest, SendRawEmailResponse>(sendRawEmailRequest, marshaller, unmarshaller, signer, cancellationToken));
        }
Example #2
0
        IAsyncResult invokeSendRawEmail(SendRawEmailRequest sendRawEmailRequest, AsyncCallback callback, object state, bool synchronized)
        {
            IRequest    irequest     = new SendRawEmailRequestMarshaller().Marshall(sendRawEmailRequest);
            var         unmarshaller = SendRawEmailResponseUnmarshaller.GetInstance();
            AsyncResult result       = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);

            Invoke(result);
            return(result);
        }
Example #3
0
        /// <summary>
        /// <para>Sends an email message, with header and content specified by the
        /// client. The <c>SendRawEmail</c> action is useful for sending multipart
        /// MIME emails, with attachments or inline content.</para> <para>The raw
        /// text of the message must comply with Internet email standards;
        /// otherwise, the message cannot be sent. For more information, go to
        /// the Amazon SES Developer Guide.</para>
        /// </summary>
        ///
        /// <param name="sendRawEmailRequest">Container for the necessary
        ///           parameters to execute the SendRawEmail service method on
        ///           AmazonSimpleEmailService.</param>
        ///
        /// <returns>The response from the SendRawEmail service method, as
        ///         returned by AmazonSimpleEmailService.</returns>
        ///
        /// <exception cref="MessageRejectedException"/>
        public SendRawEmailResponse SendRawEmail(SendRawEmailRequest sendRawEmailRequest)
        {
            IRequest <SendRawEmailRequest> request  = new SendRawEmailRequestMarshaller().Marshall(sendRawEmailRequest);
            SendRawEmailResponse           response = Invoke <SendRawEmailRequest, SendRawEmailResponse> (request, this.signer, SendRawEmailResponseUnmarshaller.GetInstance());

            return(response);
        }