明輝手游網(wǎng)中心:是一個免費提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺!

Jmail發(fā)送附件

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

用Jmail發(fā)送附件:
jmail.Body="this is a file from jmail using c# asp.net";

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

發(fā)送HTML:

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

如果HTML內(nèi)容中含有圖像等連接,可以:

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)


標(biāo)簽:Jmail發(fā)送附件