通过交换在线 VBA 发送电子邮件

时间:2021-03-12 03:38:01

标签: vba smtp office365 exchange-server cdo.message

我正在努力设置 smtp 以进行在线交换。

代码如下:

With eMailConfig.Fields
    .Item(SchemaPath & "sendusing") = 2
    .Item(SchemaPath & "smtpserver") = "smtp.office365.com"
    .Item(SchemaPath & "smtpserverport") = "587"
    .Item(SchemaPath & "smtpauthenticate") = True
    .Item(SchemaPath & "sendusername") = "o365account"
    .Item(SchemaPath & "sendpassword") = "password" 
    .Update
End With

然后出现错误:

���� '8004020e' /site/common/function.asp, �� 355

采取的步骤:

  • 在办公室管理门户中,启用 SMTP AUTH。
  • ID/PW 正确。
  • 默认安全设置已关闭。
  • 尝试端口 25,smtp authenicate = 1

你有什么想法吗?

0 个答案:

没有答案