无法发送html邮件内容

pri*_*e v 0 email coldfusion

<cfhttp url = "https://api.elasticemail.com/mailer/send?username=myusername&api_key=myapi-key&from=#attributes.from#&from_name=#attributes.from#&to=#attributes.to#&subject=#attributes.subject#&body_html=#attributes.content#&reply_to=#attributes.replyto#"
    method = "POST"
    result="mailResult">
</cfhttp>
Run Code Online (Sandbox Code Playgroud)

我使用上述Web服务发送电子邮件.尝试发送包含HTML内容的大型电子邮件时,通过邮件不会收到任何内容.发送带有HTML内容的简单电子邮件(没有任何样式或背景颜色)时,它将正常工作.发送邮件时是否存在大小限制或任何其他条件?为什么没有发送电子邮件?

Ale*_*ban 5

您将电子邮件的内容(html正文)作为查询字符串的一部分:&body_html=#attributes.content#.URL的最大长度有限制.

如果您可以使用POST邮件请求正文中的电子邮件内容,请尝试从邮件提供程序API的文档中找到

<cfhttpparam name="body_html" type="formfield" value="#attributes.content#">
Run Code Online (Sandbox Code Playgroud)