i’m developping an ASP.NET Core project with Angular as front-End.
after a user creates an invoice, i want to open outlook in mode ‘New mail’ with the customer adrees mail prefilled and the invoice document attached.
there is no problem in sending the cistomer mail or creating the invoice document (PDF).
the roblem is how to open outlook in the user pc and attach the document to a mail ready to be sent.
Thanks a lot.
2
Answers
The best what you could do is to use the mailto protocol from your web application for opening the default mail client.
The Considerations for server-side Automation of Office article states the following:
Besides a
mailto
link, your other option is creating an EML (MIME file) with the subject/body/attachment pre-populated. The desktop version of Outlook will be happy to open an EML file, and if the message includesX-Unset: 1
MIME header, the mesage will be show in the draft (unsent) mode ready to be sent.