附件的邮件出现乱码问题"/>
asp jmail发送带附件的邮件出现乱码问题
今天在利用Jmail发送带附件的邮件时,一直是一些“乱码”,如下:This is a multipart message in MIME format. ----NEXT_BM_ 531421835CAE4AC0B6126F 542603A174 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: Quoted-PrintableQQMail-LinkID:ZF3310-iVcJK3iEQI9IQSp_TGZOV58 QQMail-LinkSize:45413 QQMail-LineLen:60 QQMail-BreakType:1 QQMail-Key:aed79e33e9e7932b9198d3ad8f1e1eb2 QQMail-MD5:632afd89fa1ab112c8548f8f492ba8fa QQMail-LinkEnd ----NEXT_BM_531421835CAE4AC0B6126F542603A174--
Sub SendMail2(MailContent,MailFile,MailTitle,receiveMail)
Dim JMail
Set JMail = Server.CreateObject("JMail.Message")
JMail.Silent = true
JMail.Charset = "gb2312"
'JMail.ContentType = "text/html"
JMail.Priority = 2 ' 设置优先级
JMail.From = "" '发件箱
'输入smtp服务器验证登陆名JMail.MailServerUserName = ""
'输入smtp服务器验证密码JMail.MailServerPassword = ""
JMail.AddRecipient(receiveMail)'设置收件箱
if MailFile<>"" then
JMail.AddAttachment (MailFile)
end if
JMail.Subject = MailTitle
JMail.HTMLBody = MailContent
If JMail.Send("smtp.exmail.qq") then
Response.Write("ok")
else
Response.Write("信息发送失败,请稍后再试。")
end if
JMail.Close()
End Sub
网上有人说把JMail.ContentType =”text/html”设置去掉(就是不要去设置contenttype属性),试了一下,果然发送成功了
更多推荐
asp jmail发送带附件的邮件出现乱码问题
发布评论