关于使用C#.net代码在邮件中发送图像 [英] regarding sending image in mail using C#.net code

查看:63
本文介绍了关于使用C#.net代码在邮件中发送图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目中使用了以下类似的行来邮寄...

htmltable +

I have used in my project a line like below for mailing...

htmltable +

=
"<tr><td><table><tr>
<td rowspan='2' >
<img src=/'" + _SenderImagePath + "' Height='55px' Width='52px'/>
</td><td valign='top'  ><a href='" + WebURL + "?EmailId=" + _To + "'>" + _Sender + "</a></td></tr><tr><td>&nbsp;</td>";





在表格中以及所有....
但是对于图像来说,它没有显示...但是在_SenderImagePath中正确检索了路径,您能检查一下我认为可能是语法错误的错误,并尝试了多种方法吗?

此代码位于代码的后面,因此有一些语法错误,请帮忙..更准确的说...我的行如上所述.





within the table and all ....
But for image it is not displaying ... but the path is retrieved properly in _SenderImagePath can u please check what is the error I felt may be an syntax error and tried in many ways can u help?

this code is in code behind so there is some syntax error in this please help.. to be even more precise... i have the line as above.

推荐答案

不太好,但是应该可以给您一个想法在电子邮件中嵌入图像-ASP .NET,C# [ ^ ]
Not very good but this should give you an idea Embed image in Email - ASP.NET , C#[^]


使用System.Net.Mail.Attachment
use System.Net.Mail.Attachment


这篇关于关于使用C#.net代码在邮件中发送图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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