In our web application development project, we need a feature that lets the users to email themselves an attachment (~1MB) which resides on the server.I was considering two alternatives. Upon clicking on the email buttonDownload the attachment to local folder and attach it to a new email window in outlook. The flaw with this approach is that we are assuming user has Outlook installed on their machine. I am also doubtful if browsers others than IE support this feature of being able to open Outlook message and attach a file.Send the attachment from middleware code to the user using a programmatic API for sending email. The downside of this approach is that it doesn't give the flexibility to the user to use the out of the box Outlook features such as being able to add more recipients / cc / bcc, edit the message etc, though it is possible to let the user do the same by providing a UI which lets them do all that.  What would be the recommended approach to this requirement?
Send server side file as attachment in a web application
email
Neither. Make the attachment web-addressable from your server and give the users (senders and recipients) a URL from which to access it.  Launching an e-mail message in the user's choice of email client with a message body that contains text of your choosing (including the URL) is an HTML one-liner.  (OK, probably more than one line, with all the encoded line breaks and spaces you'll need to use to make it legible and cross-browser compatible).  Read up on the mailto: protocol. 