无需imap直接从服务器获取gmail附件

发布于 2024-09-15 12:56:15 字数 428 浏览 0 评论 0原文

我正在编写一个 firefox Greasemonkey 脚本,该脚本应该在 gmail 内部运行,并允许用户将所有附件从 gmail 对话线程提交到我的服务器。目前我只看到两种方法。

  • 要求用户进行身份验证并通过用户 imap/pop3 访问直接从我的服务器获取。我将通过 imap 完全访问用户邮箱,这让用户有点怀疑。

  • 从用户的 gmail 界面将转发所有邮件发送到我的一个邮件帐户,然后使用 imap 从那里获取附件。为此,我不需要用户邮箱访问权限。

我可以解析 gmail DOM 并获取附件链接,但它们只能在登录的用户浏览器中工作。我想找出一种方法,将附件链接发送到我的服务器,然后服务器通过curl 或其他方式获取它们。或者可能是 JavaScript 直接将附件发送到我的服务器的某种方式。这可能吗?

谢谢

I am writing a firefox greasemonkey script which is supposed to run inside gmail and allow users to submit all attachments from a gmail conversation thread to my server. I only see two ways of doing this currently.

  • Ask user to authenticate and fetch via users imap/pop3 access directly from my server. I will have complete access to users mailbox via imap and this makes the users a bit skeptical.

  • Send a Forward All mail from user's gmail interface to one of my mail accounts and then get the attachments from there using imap. I do not need users mailbox access for this.

I can parse the gmail DOM and get the attachments links but they work only from logged in users browser. I want to figure out a way whereby I just send in the attachments links to my server and server fetches they via curl or something. Or maybe some way that javascript sends the attachments to my server directly. Is that possible ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小巷里的女流氓 2024-09-22 12:56:15

假设我进入收件箱,复制邮件附件之一的 URL,然后将其发送到您的服务器。如果你尝试卷曲它,你将被要求使用我的凭据登录。该 URL 不是某种 OTP 类型的链接,无需授权即可唯一引用附件。

您必须使用与 GMail 邮箱通信的界面之一。

Suppose I go into my inbox, copy the URL for one of my message attachments, and then send it to your server. If you try to curl that, you will be requested to login with my credentials. That URL is not some sort of OTP-type of link that uniquely refers to an attachment without requiring authorization.

You will have to use one of the interfaces for communicating with GMail mailboxes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文