Hi,
感谢在MSDN论坛发帖。
>>使用这个发送邮件 如果我用126的邮箱发送 没有问题 现在用outlook的发送
返回错误504,这是为什么呢?
请问你outlook的版本是什么? 还是你使用的网络邮箱Webmail Outlook.com?
这个错误意味着你没有认证成功。请确认你是否正确配置了Outgoing mail server (SMTP)的地址和端口号。
例如outlook2016:
1. 打开Account Settings, 选择你的email account ->Change...按钮。
2. 修改Outgoing mail server (SMTP)的地址。
3. 点击More Settings...按钮,选择outgoing server (SMTP) 选项卡, 输入用户名和密码。
4. 在Advanced选项卡中,输入端口号。
如果是其他版本的outlook,请参照以下文档,进行正确的SMTP设置。
希望可以帮助到你。
Best Regards,
Sera Yu
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this
thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.