且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

预填充GMAIL中的大量正文文本会导致获取Request URI太长的错误

更新时间:2022-10-19 14:56:55

我没有足够的业力评论维克托的答案本身,但不,你不能张贴到Gmail的撰写窗口。我自己试了一下,刚刚拿到了我的普通旧版Gmail主屏幕,而不是撰写屏幕,当然也不是那些按OP要求填写的值的撰写屏幕。



这是太糟糕了,因为将大量信息放入Gmail撰写窗口是一个不错的主意。 Gmail团队中的任何人都会关心解决这个问题吗?


Hi guys this is a followup from the question:

Prefilling gmail compose screen with HTML text

Where I was building a google apps application - I can call a gmail compose message page from my application using the url:

https://mail.google.com/a/domain/?view=cm&fs=1&tf=1&source=mailto&to=WHOEVER%40COMPANY.COM&su=SUBJECTHERE&cc=WHOEVER%40COMPANY.COM&bcc=WHOEVER%40COMPANY.COM&body=PREPOPULATEDBODY

However when I try to pass in the body parameter a very long line of text eg as a reply message body I get this error from GMAIL stating 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 prefilled with javascript some how...

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?