CDO.Message.1 错误 '80040213' 与服务器的传输连接失败。 /testsendMaill.asp,行 39就是最后发送哪里。

qq_37229697 2019-07-13 08:18:17
<% const email_from="1124663858@qq.com" const password="fanlianghao" const eamil_to="1796906142@qq.com" file = "C:\hello.txt" set myMail=CreateObject("CDO.Message") myMail.Subject="Sending mail with CDO" myMail.From= email_from myMail.TO= eamil_to myMail.TextBody="This is a big srupise" myMail.AddAttachment file'邮件附件文件路径 Const schema = "http://schemas.microsoft.com/cdo/configuration/" With myMail.Configuration.Fields '用with关键字减少代码输入 .Item(schema & "sendusing") = 2 '使用网络上的SMTP服务器而不是本地的SMTP服务器.Item(schema & "smtpserver") = "smtp.gmail.com" 'SMTP服务器地址 .Item(schema & "smtpauthenticate") = 1 '服务器认证方式 .Item(schema & "sendusername") = email_from '发件人邮箱 .Item(schema & "sendpassword") = Password '发件人邮箱密码 .Item(schema & "smtpserverport") = 465 'SMTP服务器端口 .Item(schema & "smtpusessl") = false '是否使用SSL .Item(schema & "smtpconnectiontimeout") = 60 '连接服务器的超时时间 .Update '更新设置 End With myMail.Send '发送邮件 %>
...全文
154 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧