在html控件中显示来自base64String的电子邮件中的图像

编程入门 行业动态 更新时间:2024-10-26 12:30:07
本文介绍了在html控件中显示来自base64String的电子邮件中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我正在向C#console应用程序的成员发送电子邮件。 我想在电子邮件中显示图片。我正在使用Base64String格式的图像。 我尝试使用以下代码,但它无法正常工作。图像未显示在电子邮件中 ​​-

Hi All, I am sending an email to members from C# console application. I want to show images in email. I am having the images in Base64String format. I tryed with following code but it is not working. The image is not displaying in email-

image.src="data:image/jpeg;base64,"+imgData;

如何让它运作? 请建议。 提前感谢您的建议。 --Avinash

How to make it work? Please suggest. Thanks in advance for your suggessions. --Avinash

推荐答案

您需要使用多部分电子邮件和特殊的 URI方案cid:。有关详细信息,请参阅我之前的回答: 发送带有图像的HTML附件 [ ^ ]。 另请参阅: http ://en.wikipedia/wiki/URI_scheme [ ^ ]。
-SA
You need to use multipart e-mail and the special URI scheme "cid:". For further detail, please see my past answer: Sending HTML attachment with images[^]. See also: en.wikipedia/wiki/URI_scheme[^].
—SA

更多推荐

在html控件中显示来自base64String的电子邮件中的图像

本文发布于:2023-11-26 19:34:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1634914.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   图像   电子邮件   html   base64String

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!