使用FluentEmail无法在电子邮件.cshtml模板中显示嵌入式图像

我一直想使用库FluentEmail在电子邮件模板的标题中显示徽标。 (我使用的是https://github.com/lukencode/FluentEmail和.Net Core 3.1中的最新版本)

到目前为止,我有...

为我服务:

Maybe

在我的.cshtml模板中,我有:

       await email
            .To(emailaddress)
            .Subject("Hello!")
            .UsingTemplateFromFile($"{Directory.getcurrentDirectory()}/EmailTemplates/template.cshtml",new
            {
                HeaderText = "Welcome",ContentText = emailContent,FooterText = footerContent,})
            .AttachFromFilename($"{Directory.getcurrentDirectory()}/EmailTemplates/img/header.jpg","image/jpg","header.jpg")
            .SendAsync();

图像已成功附加到电子邮件中。但这并没有显示为嵌入在电子邮件模板中(它只是在其中显示一个空的正方形)。

有人可以帮我吗?我想念的是什么?

iCMS 回答:使用FluentEmail无法在电子邮件.cshtml模板中显示嵌入式图像

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2048145.html

大家都在问