0

Hello I am using following code to create to email message and then call CreateCampaign. Everything works fine except when the emailHtmlBody goes over 500KB I am getting an exception.


    MessageConfiguration messageConfiguration = new MessageConfiguration();
    messageConfiguration.EmailMessage = new CampaignEmailMessage()
    {
        FromAddress = senderAddress,
        HtmlBody = emailHtmlBody,
        Body = emailTxtBody,
       Title = emailSubject
    };


    Amazon.Pinpoint.Model.BadRequestException was unhandled by user code
      ErrorCode=BadRequestException
      HResult=-2146233088
      Message=Template 312187139448-197b228352f54341865e9b94931c0386-1-0 exceeds maximum allowed size of 500 KB. (Service: AmazonSimpleEmailService; Status Code: 400; Error Code: InvalidTemplate; Request ID: 5561ea11-0d53-40bf-9067-1d0efbf98c74; Proxy: null)

Anybody have any idea what to do here? When the HTML is not that big everything works fine. There is no template used at all.

Thanks

Sam
  • 19
  • 6

0 Answers0