我一直想使用库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();
图像已成功附加到电子邮件中。但这并没有显示为嵌入在电子邮件模板中(它只是在其中显示一个空的正方形)。
有人可以帮我吗?我想念的是什么?