首页 > 解决方案 > 从带有 Angular 应用程序链接的服务器打开 .msg 文件

问题描述

我一直在寻找一种在 Outlook 中打开带有格式化正文的电子邮件的方法。正文包含一个表格和图像。

由于mailto我没有找到解决方案,所以我想知道是否可以从我的 Spring Boot 后端下载 .msg 模板文件,然后用 Outlook 打开它。

这必须通过 Angular 应用程序中的链接来完成,并且需要在 Edge 和 Chrome 上兼容。如果无法直接打开电子邮件,那么至少将其下载为 .msg 文件会提供解决方案。

这是我为弹簧靴找到的:

@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);

    }

但是如何将其转换为 Angular 端的 .msg 文件?

标签: angularspring-bootoutlook

解决方案


推荐阅读