Note that there are some explanatory texts on larger screens.

plurals
  1. POSending Emails with attachment of less than 10 MB from AWS SES
    text
    copied!<p>We are using AWS SES to send Emails from our C# application. We have an attachment(PDF File) of size 9.28MB and when we try to send the Email with the attachment, it throws the following exception:</p> <pre><code>System.Xml.XmlException: Root element is missing. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at Amazon.Runtime.Internal.Transform.UnmarshallerContext.Read() at Amazon.Runtime.Internal.Transform.ErrorResponseUnmarshaller.Unmarshall(UnmarshallerContext context) at Amazon.SimpleEmail.Model.Transform.SendRawEmailResponseUnmarshaller.UnmarshallException(UnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) at Amazon.Runtime.AmazonWebServiceClient.processWebException[X,Y](String requestName, WebException we, HttpWebRequest webRequest, IResponseUnmarshaller`2 unmarshaller, IRequest`1 request, Int32 retries) at Amazon.Runtime.AmazonWebServiceClient.Invoke[X,Y](IRequest`1 request, AbstractAWSSigner signer, IResponseUnmarshaller`2 unmarshaller) at Amazon.SimpleEmail.AmazonSimpleEmailServiceClient.SendRawEmail(SendRawEmailRequest sendRawEmailRequest) at MyApp.AmazonSESWrapper.SendRawEmail(String awsAccessKey, String awsSecretKey, List`1 to, List`1 cc, List`1 bcc, String senderEmailAddress, String replyToEmailAddress, String subject, String body, String text, String filePath, String exceptionDetails) </code></pre> <p>But when we send a 7.50MB word document as attachment, we are getting the following exception:</p> <pre><code>Amazon.SimpleEmail.AmazonSimpleEmailServiceException: Message length is more than 10485760 bytes long: '10788624'. ---&gt; System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at Amazon.Runtime.AmazonWebServiceClient.Invoke[X,Y](IRequest`1 request, AbstractAWSSigner signer, IResponseUnmarshaller`2 unmarshaller) --- End of inner exception stack trace --- at Amazon.Runtime.AmazonWebServiceClient.processWebException[X,Y](String requestName, WebException we, HttpWebRequest webRequest, IResponseUnmarshaller`2 unmarshaller, IRequest`1 request, Int32 retries) at Amazon.Runtime.AmazonWebServiceClient.Invoke[X,Y](IRequest`1 request, AbstractAWSSigner signer, IResponseUnmarshaller`2 unmarshaller) at Amazon.SimpleEmail.AmazonSimpleEmailServiceClient.SendRawEmail(SendRawEmailRequest sendRawEmailRequest) at </code></pre> <p>From the Discussion Forum and FAQ, it says the maximum attachment size is 10MB, but the error occurs for less than 10MB attachments also. </p> <p><a href="https://forums.aws.amazon.com/thread.jspa?messageID=346305" rel="nofollow">https://forums.aws.amazon.com/thread.jspa?messageID=346305</a></p> <p><a href="http://aws.amazon.com/ses/faqs/#49" rel="nofollow">http://aws.amazon.com/ses/faqs/#49</a></p> <p>Please suggest on this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload