0

I've been looking for a way to open an email in Outlook with a formatted body. The body contains a table and images.

With mailto I did not find a solution, so I wonder if it is possible to download the .msg template file from my Spring Boot backend, and open it with Outlook.

This has to be done with a link in an angular app and needs to be compatible on Edge and Chrome. If it's not possible to open the email directly, then at least downloading it as a .msg file would provide a solution.

Here is what I found for spring boot:

@GetMapping(path = "/trnMiniDataRefreshTemplate", produces = "application/vnd.ms-outlook")
    public @ResponseBody byte[] getFile() throws IOException {

        InputStream in = getClass()
             .getResourceAsStream("/path/to/your/email_template.msg");
        return IOUtils.toByteArray(in);

    }

But how do I convert this to a .msg file on Angular side?

Cédric S
  • 479
  • 3
  • 10

0 Answers0