I am writing a firefox greasemonkey script which is supposed to run inside gmail an开发者_Go百科d 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
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.
精彩评论