My application is set up so that every time a new mail comes into a GMail inbox, it's details are stored into my database i.e. the subject, the body etc. I'm also saving any attachments the email might have onto my local server file system. This email is then displayed in a web app. and users can download the attachments that are stored on my local file system.
I'd like to change this so that I can link directly to the Gmail version of the attachment instead of downloading the attachment and then linking to it. Is there any way to do this?
I'm using JavaMail for email fetching and processing.