【发布时间】:2017-10-22 02:43:03
【问题描述】:
我在使用 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
【问题讨论】:
-
如果您在
.Send之前执行Response.Write(Server.HTMLEncode(HTML)),您会看到整个消息吗? -
感谢您的回复。我刚试过这个,它甚至没有那么远。仍然被切断。