明辉手游网中心:是一个免费提供流行视频软件教程、在线学习分享的学习平台!

Jmail发送附件

[摘要]用Jmail发送附件: jmail.Body="this is a file from jmail using c# asp.net"; jmail.AddAttachment(Server.MapPath("01.jpg"),false,"ima...

用Jmail发送附件:
jmail.Body="this is a file from jmail using c# asp.net";

jmail.AddAttachment(Server.MapPath("01.jpg"),false,"image/jpg");

发送HTML:

jmail.HTMLBody="<hr>this is html<br>";

如果HTML内容中含有图像等连接,可以:

1)

jmail.HTMLBody="<hr>this is html<br><img src=/article/UploadPic/20067194319104.gif'>";

2)

string cid=jmail.AddAttachment(Server.MapPath("01.jpg"),true,"image/jpg");

jmail.HTMLBody="<hr>this is html<br><img src='cid:"+cid+"'>";
(出处:Viphot)