传递给系统调用的数据区域太小“ [英] The data area passed to a system call is too small"

查看:3110
本文介绍了传递给系统调用的数据区域太小“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Outlook电子邮件是否有一定的字符串大小。我有以下代码给我一个错误

Is there a certain string size for outlook email. I have the following code that gives me an error


传递给系统调用的数据区太小

The data area passed to a system call is too small

但是,只有当我的邮件正文大于正常时,这似乎才会发生

However this only seems to occur when my message body is larger then normal

document.location.href = "mailto:" + emailAddress + "?subject=my msgs Relief&body=" + escape(message);

如果我正在删除代码,那么它不会显示此消息。所以它接缝,它与电子邮件正文中的字符数有关。请建议。

If I am removing code then it's not showing this message. So it seams that it's related to the number of characters in email body. Please suggest.

推荐答案

我最近遇到了这个确切的问题。问题是不同的浏览器(和不同的电子邮件客户端)对使用邮件链接之间可以传递的数据量有限制。

I recently came across this exact problem. The issue is that different browsers (and different email clients) have limits on the amount of data that can be passed between them using mail-to links.

例如, Internet Explorer中的最大网址长度为2,083个字符( MS KB链接)。如果您的链接(包括主题,地址和主体)的总长度超过此值,您将完全得到此错误。

For example, the maximum URL length in Internet Explorer is 2,083 characters (MS KB Link). If the total length of your link including the subject, address, and body exceeds this, you will get exactly this error.

要解决这个问题(因为我们必须支持IE),我在生成我的链接后使用了这个kludge:

To fix this (as we have to support IE), I used this kludge after generating my link:

var mailto_link = 'mailto:'+addresses+'?subject='+subject+'&body='+body_message;
win = window.open(mailto_link.substr(0,2000),'emailWindow');

这不完美,但在极少数情况下,用户会尝试生成一个巨大的通知电子邮件,礼貌地警告,事后提醒,并在活动后通知。

It's not perfect, but on the rare occasions the user tries to generate an enormous notification email, they are politely warned first, reminded during, and notified after the event.

这篇关于传递给系统调用的数据区域太小“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆