Beispiel #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, 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);
        }
Beispiel #2
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));
        }
Beispiel #3
0
        internal SendRawEmailResponse SendRawEmail(SendRawEmailRequest request)
        {
            var marshaller   = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.Instance;

            return(Invoke <SendRawEmailRequest, SendRawEmailResponse>(request, marshaller, unmarshaller));
        }
Beispiel #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the SendRawEmail operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the SendRawEmail operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <SendRawEmailResponse> SendRawEmailAsync(SendRawEmailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.Instance;

            return(InvokeAsync <SendRawEmailRequest, SendRawEmailResponse>(request, marshaller,
                                                                           unmarshaller, cancellationToken));
        }
Beispiel #5
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);
        }
Beispiel #6
0
        public void SendRawEmailMarshallTest()
        {
            var operation = service_model.FindOperation("SendRawEmail");

            var request         = InstantiateClassGenerator.Execute <SendRawEmailRequest>();
            var marshaller      = new SendRawEmailRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator       = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);

            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context         = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response        = SendRawEmailResponseUnmarshaller.Instance.Unmarshall(context)
                                  as SendRawEmailResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the SendRawEmail operation.
        /// <seealso cref="Amazon.SimpleEmail.IAmazonSimpleEmailService.SendRawEmail"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SendRawEmail operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
		public Task<SendRawEmailResponse> SendRawEmailAsync(SendRawEmailRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, SendRawEmailRequest, SendRawEmailResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the SendRawEmail operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SendRawEmail operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<SendRawEmailResponse> SendRawEmailAsync(SendRawEmailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.Instance;

            return InvokeAsync<SendRawEmailRequest,SendRawEmailResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// Sends an email message, with header and content specified by the client. The <code>SendRawEmail</code>
        /// 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>
        /// There are several important points to know about <code>SendRawEmail</code>:
        /// </para>
        ///  <ul> <li> 
        /// <para>
        /// You can only send email from verified email addresses and domains; otherwise, you
        /// will get an "Email address not verified" error. If your account is still in the Amazon
        /// SES sandbox, 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 <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html">Amazon
        /// SES Developer Guide</a>.
        /// </para>
        ///  </li> <li> 
        /// <para>
        /// The total size of the message cannot exceed 10 MB. This includes any attachments that
        /// are part of the message.
        /// </para>
        ///  </li> <li> 
        /// <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>
        ///  </li> <li> 
        /// <para>
        /// The To:, CC:, and BCC: headers in the raw message can contain a group list. Note that
        /// each recipient in a group list counts towards the 50-recipient limit.
        /// </para>
        ///  </li> <li> 
        /// <para>
        /// Amazon SES overrides any Message-ID and Date headers you provide.
        /// </para>
        ///  </li> <li> 
        /// <para>
        /// For every message that you send, the total number of recipients (To:, CC: and BCC:)
        /// is counted against your sending quota - 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>
        ///  </li> <li> 
        /// <para>
        /// If you are using sending authorization to send on behalf of another user, <code>SendRawEmail</code>
        /// enables you to specify the cross-account identity for the email's "Source," "From,"
        /// and "Return-Path" parameters in one of two ways: you can pass optional parameters
        /// <code>SourceArn</code>, <code>FromArn</code>, and/or <code>ReturnPathArn</code> to
        /// the API, or you can include the following X-headers in the header of your raw email:
        /// </para>
        ///  <ul> <li> 
        /// <para>
        ///  <code>X-SES-SOURCE-ARN</code> 
        /// </para>
        ///  </li> <li> 
        /// <para>
        ///  <code>X-SES-FROM-ARN</code> 
        /// </para>
        ///  </li> <li> 
        /// <para>
        ///  <code>X-SES-RETURN-PATH-ARN</code> 
        /// </para>
        ///  </li> </ul> <important> 
        /// <para>
        /// Do not include these X-headers in the DKIM signature, because they are removed by
        /// Amazon SES before sending the email.
        /// </para>
        ///  </important> 
        /// <para>
        /// For the most common sending authorization use case, we recommend that you specify
        /// the <code>SourceIdentityArn</code> and do not specify either the <code>FromIdentityArn</code>
        /// or <code>ReturnPathIdentityArn</code>. (The same note applies to the corresponding
        /// X-headers.) If you only specify the <code>SourceIdentityArn</code>, Amazon SES will
        /// simply set the "From" address and the "Return Path" address to the identity specified
        /// in <code>SourceIdentityArn</code>. For more information about sending authorization,
        /// see the <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon
        /// SES Developer Guide</a>.
        /// </para>
        ///  </li> </ul>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the SendRawEmail service method.</param>
        /// 
        /// <returns>The response from the SendRawEmail service method, as returned by SimpleEmailService.</returns>
        /// <exception cref="Amazon.SimpleEmail.Model.ConfigurationSetDoesNotExistException">
        /// Indicates that the configuration set does not exist.
        /// </exception>
        /// <exception cref="Amazon.SimpleEmail.Model.MailFromDomainNotVerifiedException">
        /// 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 <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html">Amazon
        /// SES Developer Guide</a>.
        /// </exception>
        /// <exception cref="Amazon.SimpleEmail.Model.MessageRejectedException">
        /// Indicates that the action failed, and the message could not be sent. Check the error
        /// stack for more information about what caused the error.
        /// </exception>
        public SendRawEmailResponse SendRawEmail(SendRawEmailRequest request)
        {
            var marshaller = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.Instance;

            return Invoke<SendRawEmailRequest,SendRawEmailResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the SendRawEmail operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SendRawEmail operation on AmazonSimpleEmailServiceClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndSendRawEmail
        ///         operation.</returns>
        public IAsyncResult BeginSendRawEmail(SendRawEmailRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.Instance;

            return BeginInvoke<SendRawEmailRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 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;
 }
        IAsyncResult invokeSendRawEmail(SendRawEmailRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
        public void SendRawEmailMarshallTest()
        {
            var operation = service_model.FindOperation("SendRawEmail");

            var request = InstantiateClassGenerator.Execute<SendRawEmailRequest>();
            var marshaller = new SendRawEmailRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null);
            var response = SendRawEmailResponseUnmarshaller.Instance.Unmarshall(context)
                as SendRawEmailResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
        /// <summary>
        /// Initiates the asynchronous execution of the SendRawEmail operation.
        /// <seealso cref="Amazon.SimpleEmail.IAmazonSimpleEmailService.SendRawEmail"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the SendRawEmail operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
		public async Task<SendRawEmailResponse> SendRawEmailAsync(SendRawEmailRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new SendRawEmailRequestMarshaller();
            var unmarshaller = SendRawEmailResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, SendRawEmailRequest, SendRawEmailResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
  /// <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;
 }
 /// <summary>
 /// Initiates the asynchronous execution of the SendRawEmail operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the SendRawEmail operation on AmazonSimpleEmailServiceClient.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
 ///          procedure using the AsyncState property.</param>
 public void SendRawEmailAsync(SendRawEmailRequest request, AmazonServiceCallback<SendRawEmailRequest, SendRawEmailResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new SendRawEmailRequestMarshaller();
     var unmarshaller = SendRawEmailResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<SendRawEmailRequest,SendRawEmailResponse> responseObject 
                     = new AmazonServiceResult<SendRawEmailRequest,SendRawEmailResponse>((SendRawEmailRequest)req, (SendRawEmailResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<SendRawEmailRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }