views:

33

answers:

1

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

A: 

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.

Jesse Dhillon
ok, so imap via oauth maybe the way to go. Thanks
Nands
If you accept that answer, will you please place the check mark next to it? Thanks
Jesse Dhillon