嵌入式图像在浏览器中显示时没有显示在Outlook中? [英] Embedded images not showing in outlook while it's showing in Browser?

查看:260
本文介绍了嵌入式图像在浏览器中显示时没有显示在Outlook中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这里,我试图将图像嵌入到我的外观中,但该图像不是 进入Outlook,当我执行视图源并将其运行时 html.image显示.需要帮助.在此代码中,我已经将图像转换为字节 以64为基数. !前景中的图像]

Outlook中不支持嵌入式图像(以及其他一些电子邮件客户端).使用<img src="http://www.website.com/path/to/image.jpg">远程引用.jpg|.png|.gif文件是最安全和最佳做法.

这是电子邮件客户端对嵌入式图像的支持的细分:

here i am trying to Embeds a image in my outlook but the image is not coming in outlook and when i do the view source and run it as html.image shows. need help.in this code i have convert image to byte base 64. !IMAGE IN OUTLOOK]1 USING 2016 OUTLOOK

private static void SendNotificationEmail(string p_TenantName, string p_TenantEmail, string p_Gmap_code, string p_ThemeEmailFrom, int p_remaindays, int p_contactid, string p_date)
{
Common.Email email = default(Common.Email);
string body = null;
string DexuslogoImage1 = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"Images\\Dexus_Notce_Logo.png");
string DexuslogoImage2 = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Images\\DexusTenantNotice.png");
bodys += "src='" + writeImageToString(DexuslogoImage2) +
} 

public static string writeImageToString(string img)
{
    byte[] bytes = File.ReadAllBytes(img);
    dynamic b64String = Convert.ToBase64String(bytes);
    dynamic dataUrl = "data:image/png;base64," + b64String;
    return dataUrl;
}

解决方案

Embedded images aren't supported in Outlook (as well as a few other email clients). It's safest and best practice to reference .jpg|.png|.gif files remotely using <img src="http://www.website.com/path/to/image.jpg">.

Here's a breakdown of email client support for embedded images:

source

这篇关于嵌入式图像在浏览器中显示时没有显示在Outlook中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆