Jmail發(fā)送附件
發(fā)表時間:2024-01-30 來源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]用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)