在 GMAIL 中预填充大量正文文本时出现请求 URI 太长错误
这是此问题的后续问题。
我在构建 Google Apps 应用程序的地方 - 我可以使用以下网址从我的应用程序调用 Gmail 撰写消息页面:
但是,当我尝试在 body 参数中传递很长的一行文本(如回复消息正文)时,我从 Gmail 收到一条错误消息,指出请求 URI 太长。
有没有更好的方法来做到这一点,例如填写 gmail 撰写部分的文本正文框?或者以某种方式打开页面,并以某种方式预先填充 Javascript?
This is a followup of this question.
Where I was building a google apps application - I can call a gmail compose message page from my application using the url:
However when I try to pass in the body parameter a very long line of text (like as a reply message body), I get an error from the Gmail stating that the REQUEST URI is too long.
Is there a better way to do this as in a way to fillin the text body box of gmail compose section? Or some way to open the page, and have it somehow prefilled with Javascript?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我没有足够的业力来评论 Victor 的答案本身,但是不行,你不能 POST 到 Gmail 的撰写窗口。我自己尝试过,只是得到了常规的旧 Gmail 主屏幕,而不是撰写屏幕,当然也不是按照 OP 的要求填写了值的撰写屏幕。
这也太糟糕了,因为将大量信息放入 Gmail 撰写窗口是个好主意。 Gmail 团队中有人愿意解决这个问题吗?
I don't have enough karma to comment on Victor's answer itself, but no, you cannot POST to Gmail's compose window. I tried it myself and just got my regular old Gmail home screen, not the compose screen and certainly not the compose screen with the values filled in as the OP wanted.
It's too bad too, because it was a good idea to get loads of info into a Gmail compose window. Would anyone on the Gmail team care to address this issue?
Google 不会处理长度超过 1584 个字符的 mailto 链接(在
mailto:
部分之后)。Google will not process mailto links that are longer than 1584 characters (after the
mailto:
part).这是大 URL 的问题 什么是不同浏览器中 URL 的最大长度?
使用方法 GET 可以使用
该方法,使用方法 POST 则不起作用,它尝试但只是到达某个点并停止
This is the problem with large URL's What is the maximum length of a URL in different browsers?
This works using Method GET
This doesn't work using Method POST it tries but just gets to a point and stops
为什么不使用一个带有隐藏字段的表单(方法 = post,目标 = 空白)来表示您需要发送的变量。然后发布该表格
Why not have a form (method = post, target = blank) with hidden fields that represent the variables you need to send. Then post that form