Bijan
Bijan

Reputation: 8586

Generate .msg file for Outlook

Is there a way to have Javascript/jQuery (or any other web-based language) generate a .msg file that also has an attachment?

I am trying to make it so when a user clicks a button, it downloads a .msg file that has Subject/Body filled out and has a file attached. I know I can just use a long mailto: link but that would not let me attach a file.

Upvotes: 4

Views: 1931

Answers (1)

Johnny Harlamert
Johnny Harlamert

Reputation: 271

You will not be able to pass such content due to both protocol and security measures. Also there is no way to know how each browser is setup to react to the mailto address (Outlook, Webmail, Nothing)..

If you want to send emails with a prefilled subject or content then I suggest you handle it server side with PHP or equivalent language. A great library to consider is SwiftMail

Good Luck

Upvotes: 2

Related Questions