html - EML file downloaded in browser instead of opened inline with email app -
My intention is to send a request to the server, and with feedback (in EML format) open Outlook and Thunderbird where a user e Can edit and send mail text and send it.
I am using a Java servlet to generate a response with the following headers (I think it should not make any difference):
-Type: Message / RFC 822 Content-Dispute: Attachment; File name = "email.eml" The problem is that instead of opening it directly in the browser, the browser downloads the file I tried
- Settings: Inline; File name = "email.eml" But there is only one problem. I have tested with IE 10 and Chrome 38, both have similar behaviors.
If the user clicks on the downloaded file, then the email app opens correctly and they can send email, but any discarded disk disk is being made on the disc?
The only alternative solution I can think of is using the Melato protocol.
Meloto allows you to specify general email fields such as sending body, subject, address etc.
Automatically open this bit of JavaScript to email:
// Setting it here for sake or readability. Var toaddress = "email@address.com"; Var topic = "subject line"; Var body = "The contents of the message here. \ N \ n Newline works too"; Window.location = "mailto :? To =" + encodircontent (toaddress) + "& subject =" + encoder component (subject) + "& body =" + encoder component (body); Using this you can modify your servlet back to address the subject, body, and an AJAX call and execute snippet on top.
Take this with a grain of salt, as per any specificity listed in the standard, depending on the fully-used email client (eg, the body does HTML).
Comments
Post a Comment