当前位置:编程学习 > asp >>

Jmail发送附件

答案:用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=http://www.image.com/img.gif'>";

2)

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

jmail.HTMLBody="<hr>this is html<br><img src='cid:"+cid+"'>";


上一个:通过探测邮件服务器进行Email地址有效性检验
下一个:Email地址有效性验证

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,