【问题标题】:Character limit when generating an email?生成电子邮件时的字符限制?
【发布时间】:2013-08-16 04:52:11
【问题描述】:

我正在使用下面的代码生成电子邮件,如果投诉文本框大于 30-40 个字符,则电子邮件不会生成,我只会得到一个空白的 IE 页面。有什么限制吗?

 <script type="text/javascript">
   function sendMail(CustomerTextbox, AddressTextBox, CityTextBox, StateDropDown, ZipTextBox, ModelTextbox, SerialTextbox, ReferenceTextbox, ComplaintTextBox, WarrentyTextBox) {
   var CustomerTextbox = document.getElementById(CustomerTextbox).value;
   var AddressTextBox = document.getElementById(AddressTextBox).value;
   var CityTextBox = document.getElementById(CityTextBox).value;
   var StateDropDown = document.getElementById(StateDropDown).value;
   var ZipTextBox = document.getElementById(ZipTextBox).value;
   var ModelTextbox = document.getElementById(ModelTextbox).value;
   var SerialTextbox = document.getElementById(SerialTextbox).value;
   var ReferenceTextbox = document.getElementById(ReferenceTextbox).value;
   var ComplaintTextBox = document.getElementById(ComplaintTextBox).value;
   var WarrentyTextBox = document.getElementById(WarrentyTextBox).value;

   var body = "Please issue a RMA for this case." + "\r\n";
   body += CustomerTextbox + "\r\n";
   body += AddressTextBox + "\r\n";
   body += CityTextBox + "\r\n";
   body += StateDropDown + "\r\n";
   body += ZipTextBox + "\r\n";
   body += ModelTextbox + "\r\n";
   body += SerialTextbox + "\r\n";
   body += ReferenceTextbox + "\r\n";
   body += ComplaintTextBox + "\r\n";
   body += WarrentyTextBox + "\r\n";

   document.location = "mailto:&subject=" + "Name - " + CustomerTextbox + "&body=" + escape(body);

}

【问题讨论】:

  • 你能显示其余的功能吗? body 发生了什么?
  • body的最终值是多少?
  • 我发布了其余的对不起
  • 一般来说,你不能依赖客户的邮件代理来关注你的“body”参数。
  • 整个正文总共有多少个字符? URL 有一个限制(每个浏览器不同),这可能是您遇到的问题。

标签: javascript asp.net


【解决方案1】:

Internet Explorer 的最大 URL 长度为 2,083 个字符, see Microsoft Support KB 208427.

还可以查看question 417142

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-02
    • 1970-01-01
    • 1970-01-01
    • 2016-09-26
    • 2017-01-09
    • 2016-02-05
    相关资源
    最近更新 更多