Exemple #1
0
        /// <summary>
        /// <para>Composes an email message based on input data, and then immediately queues the message for sending. </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.</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="sendEmailRequest">Container for the necessary parameters to execute the SendEmail service method on
        /// AmazonSimpleEmailService.</param>
        ///
        /// <returns>The response from the SendEmail 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 <SendEmailResponse> SendEmailAsync(SendEmailRequest sendEmailRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new SendEmailRequestMarshaller();
            var unmarshaller = SendEmailResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, SendEmailRequest, SendEmailResponse>(sendEmailRequest, marshaller, unmarshaller, signer, cancellationToken));
        }
Exemple #2
0
        IAsyncResult invokeSendEmail(SendEmailRequest sendEmailRequest, AsyncCallback callback, object state, bool synchronized)
        {
            IRequest    irequest     = new SendEmailRequestMarshaller().Marshall(sendEmailRequest);
            var         unmarshaller = SendEmailResponseUnmarshaller.GetInstance();
            AsyncResult result       = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);

            Invoke(result);
            return(result);
        }
Exemple #3
0
        /// <summary>
        /// <para>Composes an email message, based on input data, and then
        /// immediately queues the message for sending.</para>
        /// </summary>
        ///
        /// <param name="sendEmailRequest">Container for the necessary parameters
        ///           to execute the SendEmail service method on
        ///           AmazonSimpleEmailService.</param>
        ///
        /// <returns>The response from the SendEmail service method, as returned
        ///         by AmazonSimpleEmailService.</returns>
        ///
        /// <exception cref="MessageRejectedException"/>
        public SendEmailResponse SendEmail(SendEmailRequest sendEmailRequest)
        {
            IRequest <SendEmailRequest> request  = new SendEmailRequestMarshaller().Marshall(sendEmailRequest);
            SendEmailResponse           response = Invoke <SendEmailRequest, SendEmailResponse> (request, this.signer, SendEmailResponseUnmarshaller.GetInstance());

            return(response);
        }