Pinpoint 使用 .NET API 给出模板错误

问题描述

您好,我正在使用以下代码创建电子邮件,然后调用 CreateCampaign。 一切正常,除非当 emailHtmlBody 超过 500KB 时,我遇到了异常。


    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)

有人知道在这里做什么吗?当 HTML 不是那么大时,一切正常。 根本没有使用模板。

谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)