求解决,菜鸟不懂
代码如下
Set myMail=server.CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="xiayuxuan91@163.com"
myMail.To="253305452@qq.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'远程 SMTP 服务器的 IP 或名称
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="smtp.163.com"
'服务器端口
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=25
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91" '用户名
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendpassword")_
="**************" '密码
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")_
=1
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/smtpusessl")_
=false
myMail.Configuration.Fields.Update
myMail.Send
总提示服务器拒绝
5 个解决方案
#1
你哪时注册的,新注册的163已经不允许smtp,pop3了。。2006年11月16日之后注册的好像都不能开通了
#2
版主大大,这个,是这样的嚒?可是图上说的已经开通了
#3
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/smtpaccountname")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91" '用户名
加红色的部分试试
(" http://schemas.microsoft.com/cdo/configuration/smtpaccountname")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91" '用户名
加红色的部分试试
#4
版主老大,不行呀,要疯了
#5
解决了,好像是地址前面多了俩空格。晕,后面又加了很多代码,搞的不确定了。反正这样绝对是行滴,附上代码
谢谢版主大人
Set myMail=server.CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="xiayuxuan91@163.com"
myMail.To="253305453@qq.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'远程 SMTP 服务器的 IP 或名称
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="smtp.163.com"
'服务器端口
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=465
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91@163.com" '用户名
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword")_
="密码" '密码
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpaccountname")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendemailaddress")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpuserreplyemailaddress")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")_
=1
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl")_
=true
myMail.Configuration.Fields.Update
On Error Resume Next
myMail.Send
谢谢版主大人
#1
你哪时注册的,新注册的163已经不允许smtp,pop3了。。2006年11月16日之后注册的好像都不能开通了
#2
版主大大,这个,是这样的嚒?可是图上说的已经开通了
#3
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/smtpaccountname")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91" '用户名
加红色的部分试试
(" http://schemas.microsoft.com/cdo/configuration/smtpaccountname")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
(" http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91" '用户名
加红色的部分试试
#4
版主老大,不行呀,要疯了
#5
解决了,好像是地址前面多了俩空格。晕,后面又加了很多代码,搞的不确定了。反正这样绝对是行滴,附上代码
谢谢版主大人
Set myMail=server.CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="xiayuxuan91@163.com"
myMail.To="253305453@qq.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
'远程 SMTP 服务器的 IP 或名称
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
="smtp.163.com"
'服务器端口
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
=465
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername")_
="xiayuxuan91@163.com" '用户名
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword")_
="密码" '密码
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpaccountname")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendemailaddress")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpuserreplyemailaddress")_
="xiayuxuan91@163.com"
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")_
=1
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl")_
=true
myMail.Configuration.Fields.Update
On Error Resume Next
myMail.Send
谢谢版主大人