asp jmail发送带附件的邮件出现乱码问题

编程入门 行业动态 更新时间:2024-10-20 13:47:50

asp jmail发送带<a href=https://www.elefans.com/category/jswz/34/1768977.html style=附件的邮件出现乱码问题"/>

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-Printable

QQMail-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发送带附件的邮件出现乱码问题

本文发布于:2024-03-23 15:31:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1739812.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:附件   邮件   出现乱码   asp   jmail

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!