gpt4 book ai didi

asp-classic - 通过 HTMLBody 格式的 ASP 经典 CDOSYS 电子邮件

转载 作者:行者123 更新时间:2023-12-04 19:30:18 25 4
gpt4 key购买 nike

我在使用 HTMLBody 格式的 ASP Classic 中使用 CDOSYS 消息传递系统发送电子邮件时遇到问题。它似乎有字符限制,并且在发送电子邮件消息时,它会在电子邮件底部周围切断消息。起初,我以为在写完整个电子邮件之前发送了消息,但是经过一些故障排除和研究后,使用 HTMLBody 时存在某种 CDOSys 消息字符限制。我的问题是,有没有办法覆盖字符限制或绕过限制?这仅适用于 HTMLBODY。

编辑:“重复”标志对我没有帮助。这不是截断问题,而是 HTMLBody 限制的问题,防止在消息中完全发送冗长的消息。我检查了那篇文章,这不是我想要的答案。该线程上的回复足以回答我的问题。谢谢你们。

这是我的代码:

         Set myMail=CreateObject("CDO.Message")


HTML = HTML & "<html>"
HTML = HTML & "<body>"
HTML = HTML & "<font face='calibri'>"

HTML = HTML & "<img src='http://" & SupportTagURLWebPath & "/images/SkypeEmailHeader.png'>"
HTML = HTML & "<br><Br>"

HTML = HTML & "<font face='calibri'>"
HTML = HTML & "<b>To " & Request.Form("SkypeTemplateName") & ":</b>"
HTML = HTML & "<br><br>"

HTML = HTML & "Thank you for contacting the Bank of America Service Desk. We're committed to providing seamless support in the moments that matter."
HTML = HTML & "<br><br>"
HTML = HTML & "We heard your concerns with Skype for Business audio/video, and recommend using approved Skype for Business devices to resolve the issue."
HTML = HTML & "<br><br>"
HTML = HTML & "<h4><font color='red'>What do I need to do?</font></h4>"

HTML = HTML & "<div style='background-color: #FFF8DC;'>"
HTML = HTML & "1. Visit the <a href='http://u.go/pchk'>Skype for Business Peripheral Checker</a> & complete the form.<br>"
HTML = HTML & "<img src='http://" &SupportTagURLWebPath & "/images/SkypeEmailbody.png'><br>"
HTML = HTML & "4. Once approved, your new device(s) will be shipped to you. To get started, visit the <a href='http://u.go/tIxvB5'>Skype for Business page</a> and select <i>Setup your equipment</i> tab."
HTML = HTML & "</div>"
HTML = HTML & "<br><br>"

HTML = HTML & "<br>"
HTML = HTML & "If you still encounter Skype for Business audio/visual issues with your new device(s), please <a href='http://u.go/7I76vm'>submit a web ticket</a> and one of our expert Bank of America Service Desk employees will reach out to you."
HTML = HTML & "Thank you,"
HTML = HTML & "<br>"
HTML = HTML & "Premium Service Desk"


HTML = HTML & "<br><Br>"
HTML = HTML & "<img src='http://" & SupportTagURLWebPath & "/images/SkypeEmailFooter.png'>"

HTML = HTML & "</font>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"



myMail.Subject= "Skype for Business audio/visual experience"
myMail.From=EMAILADDRESS
myMail.To=Request.Form("SkypeTemplateEmail")
'mymail.CC= Request.Form("displayemail")
myMail.BCC="psd.wmwhc@bao.com"
myMail.ReplyTo="Do Not Reply"
'myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver")="amta3dns.bo.com"
'Server port
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
myMail.Configuration.Fields.Update


'myMail.TextBody= Request.Form("genfeedback")
myMail.HTMLBody=HTML

myMail.Send
set myMail=nothing

最佳答案

这是行长问题。如果没有 crlf,您会在 998 个字符时超出最大长度。最好的办法是编写一个函数,在中间字符串中拆分内容,避免使用 html 标签。 HTML 文本,例如在段落中,忽略换行符。

RFC

There are two limits that this standard places on the number of characters in a line. Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.

The 998 character limit is due to limitations in many implementations which send, receive, or store Internet Message Format messages that simply cannot handle more than 998 characters on a line. Receiving implementations would do well to handle an arbitrarily large number of characters in a line for robustness sake. However, there are so many implementations which (in compliance with the transport requirements of [RFC2821]) do not accept messages containing more than 1000 character including the CR and LF per line, it is important for implementations not to create such messages.

The more conservative 78 character recommendation is to accommodate the many implementations of user interfaces that display these messages which may truncate, or disastrously wrap, the display of more than 78 characters per line, in spite of the fact that such implementations are non-conformant to the intent of this specification (and that of [RFC2821] if they actually cause information to be lost). Again, even though this limitation is put on messages, it is encumbant upon implementations which display messages



感谢访问 emailonacid 的博客为指针。

关于asp-classic - 通过 HTMLBody 格式的 ASP 经典 CDOSYS 电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44112897/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com