Sign-up....

Jmail发送附件,有兴趣请进!!

Set msg = Server.CreateObject("JMail.Message")

msg.silent = true

msg.Logging = true

msg.Charset = "gb2312"

msg.ContentType = "text/html"

msg.MailServerUserName = mailuser

msg.MailServerPassword = mailpass

msg.From = mailfrom

msg.FromName = "论坛"

msg.AddRecipient myemail '收件人Email

msg.Subject = "测试邮件”!" '信件主题

mailbody="<html><head><style type='text/css'>a:link {color: #0066CC; text-decoration: none} a:visited {color: #0066CC; text-decoration: none} a:hover { color: #CC0099; text-decoration: underline}body { font-size: 9pt;} </style><title>测试</title></head><body>这是测试邮件!"

contentId = msg.AddAttachment (Server.MapPath("mail.asp"), false)

mailbody=mailbody & "</html>"

msg.Body = mailbody '正文

msg.Send(mailserver)

这段是用Jmail发送邮件,但发送的附件却是包含在网页里边的,显示出来是乱码,而不是附件另存为这样的形式,请问这是为什么?应该如何弄?

[909 byte] By [msdn] at [2007-8-15 10:05:05]
# 1 Re: Jmail发送附件,有兴趣请进!!

up我今天也遇到這樣的問題.請大家指教.

=======================================

另外一個是,怎麼可以一次過發多個附件?

99percent at 2005-11-17 16:41:37 >
# 2 Re: Jmail发送附件,有兴趣请进!!

顶,学习一下。

lsgis2001 at 2005-11-17 17:08:02 >
# 3 Re: Jmail发送附件,有兴趣请进!!

JMail.AddAttachment (FileNames)

有几个附件就加几次。

look4sword at 2005-11-18 8:20:23 >
# 4 Re: Jmail发送附件,有兴趣请进!!

去掉msg.ContentType = "text/html"就可以了

qustionwen at 2005-11-18 10:58:59 >
# 5 Re: Jmail发送附件,有兴趣请进!!

可是这样发出的附件在油箱里是没有附件标记的 就是没有那个回型针 怎么办?

qianet at 2006-2-16 19:31:10 >
# 6 Re: Jmail发送附件,有兴趣请进!!

21CN的信箱现在还可以用Jmail发送邮件吗?

JackyBeauty at 2006-2-16 21:04:23 >
# 7 Re: Jmail发送附件,有兴趣请进!!

帮顶!

去掉msg.ContentType = "text/html"就可以了

但是想发送正文带有htnl的邮件就不行了啊!

该如何解决??

Yjanuary at 2006-4-25 16:10:27 >
# 8 Re: Jmail发送附件,有兴趣请进!!

楼主有发邮件的组件吗?

我有代码,没组件,想发也发不了啊!

有的话发到我信箱好吗?

mhxz5680@ 163.com

非常感谢

mhxz5680 at 2006-4-25 18:16:05 >
# 9 Re: Jmail发送附件,有兴趣请进!!

刚刚下载了个jmail组件,请问这个组件直接可以使用,还是需要注册的?

mhxz5680 at 2006-4-25 19:03:40 >
# 10 Re: Jmail发送附件,有兴趣请进!!

msg.ContentType="multipart/mixed"

just a try

xxuu503 at 2006-4-25 19:24:04 >
# 11 Re: Jmail发送附件,有兴趣请进!!

不行,邮件的附件是以正常的附件格式显示了!

但是html的正文就不是了

该如何呢?

Yjanuary at 2006-4-26 9:01:53 >
# 12 Re: Jmail发送附件,有兴趣请进!!

去掉msg.ContentType = "text/html"就可以了

msg.Body = mailbody '正文

改成msg.HtmlBody = mailbody '正文

哈哈!

这样就可以了啊!

Yjanuary at 2006-4-26 13:03:43 >

Web

All Classified