邮件的内容区中文无法显示
出现:
Error Reading Message or message with NULL body错误!
估计是邮件编码问题!
盼高手指点!!!!!
11 个解决方案
#1
BODY 加入编码, 比如这样:
mBody="<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />"&chr(13)&mBody
mBody="<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />"&chr(13)&mBody
#2
我来试试看也
#3
我测试过了!还是不行哈!
#4
将Gb2312改为GBK试试
#5
如果这样, 那发HTML 格式的吧, 并用 GB2312/GBK 编码.
#6
<%
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "smtp.XXXX.com"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "XXXX@XXXX.com"
.From = "XXXX@XXXX.com"
.Subject = "中文发送测试"
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK "" /> "&chr(13)&"中文测试"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>
贴出代码!高手分析下!通过这种方式发信件,国外邮箱的WEB界面就看不到中文内容,显示Error Reading Message or message with NULL body错误!但是标题可以看到!
如果用客户端收下来看就正常!没有搞懂!郁闷了几天了!
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "smtp.XXXX.com"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "XXXX@XXXX.com"
.From = "XXXX@XXXX.com"
.Subject = "中文发送测试"
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK "" /> "&chr(13)&"中文测试"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>
贴出代码!高手分析下!通过这种方式发信件,国外邮箱的WEB界面就看不到中文内容,显示Error Reading Message or message with NULL body错误!但是标题可以看到!
如果用客户端收下来看就正常!没有搞懂!郁闷了几天了!
#7
高手们出来救命啊!
#8
高手们出来救命啊!
#9
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312""
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
not:
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK ""
没见过这样写编码的: GB2312/GBK
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
not:
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK ""
没见过这样写编码的: GB2312/GBK
#10
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312""
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
都是不的行的!
一样会出这种问题
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
都是不的行的!
一样会出这种问题
#11
再次关注
#1
BODY 加入编码, 比如这样:
mBody="<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />"&chr(13)&mBody
mBody="<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />"&chr(13)&mBody
#2
我来试试看也
#3
我测试过了!还是不行哈!
#4
将Gb2312改为GBK试试
#5
如果这样, 那发HTML 格式的吧, 并用 GB2312/GBK 编码.
#6
<%
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "smtp.XXXX.com"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "XXXX@XXXX.com"
.From = "XXXX@XXXX.com"
.Subject = "中文发送测试"
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK "" /> "&chr(13)&"中文测试"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>
贴出代码!高手分析下!通过这种方式发信件,国外邮箱的WEB界面就看不到中文内容,显示Error Reading Message or message with NULL body错误!但是标题可以看到!
如果用客户端收下来看就正常!没有搞懂!郁闷了几天了!
Dim iMsg
Dim iConf
Dim Flds
Dim strHTML
Dim strSmartHost
Const cdoSendUsingPort = 2
StrSmartHost = "smtp.XXXX.com"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "XXXX@XXXX.com"
.From = "XXXX@XXXX.com"
.Subject = "中文发送测试"
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK "" /> "&chr(13)&"中文测试"
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>
贴出代码!高手分析下!通过这种方式发信件,国外邮箱的WEB界面就看不到中文内容,显示Error Reading Message or message with NULL body错误!但是标题可以看到!
如果用客户端收下来看就正常!没有搞懂!郁闷了几天了!
#7
高手们出来救命啊!
#8
高手们出来救命啊!
#9
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312""
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
not:
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK ""
没见过这样写编码的: GB2312/GBK
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
not:
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312/GBK ""
没见过这样写编码的: GB2312/GBK
#10
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=GB2312""
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
都是不的行的!
一样会出这种问题
or
.HTMLBody = "<meta http-equiv=""Content-Type"" content=""text/html; charset=gbk""
都是不的行的!
一样会出这种问题
#11
再次关注