Outlook SMTPClient服务器错误5.3.4 5.2.0 [英] Outlook SMTPClient server error 5.3.4 5.2.0

查看:493
本文介绍了Outlook SMTPClient服务器错误5.3.4 5.2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC .NET Web应用程序,该应用程序已经稳定运行了一年的大部分时间.但是,今天我们收到了错误代码,我在寻找如何解决问题方面遇到了麻烦.

I have a MVC .NET web application that has been running stable for the most part of a year now. However today we received an error code and I'm having trouble finding how to resolve the issue.

在应用程序中,我使用SMTPClient发送电子邮件.为此,我们使用一个Outlook电子邮件帐户.到今天为止,一切正常.我得到的错误代码是这样的:

In the application I use SMTPClient to send emails out. For this we use a outlook email account. This was working fine until today. The error code that I get is this:

邮箱不可用.服务器响应为:5.3.4 554-554 5.2.0 STOREDRV.Deliver;投放结果横幅

Mailbox unavailable. The server response was: 5.3.4 554-554 5.2.0 STOREDRV.Deliver; delivery result banner

这是我在应用程序中使用的代码.

Here is the code that I use in my application.

var client = new SmtpClient
            {
                Host = WebConfigurationManager.AppSettings["EmailHost"],
                Port = 587,
                EnableSsl = true,
                DeliveryMethod = SmtpDeliveryMethod.Network,
                UseDefaultCredentials = false,
                Credentials = new System.Net.NetworkCredential(WebConfigurationManager.AppSettings["EmailSender"],
                    WebConfigurationManager.AppSettings["EmailSenderPassword"])
            };

在Web配置中

WebConfigurationManager.AppSettings ["EmailHost"]设置为 smtp.live.com .

此后,我添加了数据和其他当然需要的信息,但我省略了.当我们到达代码的最后部分时,将引发该错误; client.Send(mail);

After this I add data and the other information needed of course, but I omitted that. The error is thrown when we arrive at the last part of the code; client.Send(mail);

到目前为止,我尝试过的所有操作均无效.

Things I have tried so far that did not work.

  • 登录到outlook.live.com上的电子邮件帐户.
  • 更新了Outlook.live.com上电子邮件帐户的安全设置.
  • smtp.live.com 更改为 smtp-mail.outlook.com
  • 将端口更改为25(这给了我同样的错误)和465(这给了我一个服务器未到达错误)
  • 将EnableSsl设置为false(这样做时客户端不起作用)
  • Log into the email account on outlook.live.com.
  • Updated security settings on outlook.live.com for the email account.
  • Changed smtp.live.com to smtp-mail.outlook.com
  • Changed the Port to 25 (which gave me the same error) and 465 (Which gave me a server not reached error)
  • Set EnableSsl to false (Client doesn't work when I do that)

我在SO和其他网站上看到了几则相似或具有相同错误代码的帖子.但是他们要么无法回答,要么将登录电子邮件帐户标记为解决方案,这对我不起作用.

I have seen several posts on SO and other websites that are similar or have the same error code. But they either go unanswered or they mark logging in to the email account as the solution, which does not work for me.

登录电子邮件帐户后,我们收到了来自Microsoft的更新通知,内容涉及新的隐私和安全更新.这是从9月16日开始的.我不知道您是否需要三个月的期限.但是一周前,该电子邮件帐户已发送了一封电子邮件,而昨天却发送失败.我们同意弹出该协议,但仍然无法正常工作.

When we logged into the email account we got an update notice from Microsoft talking about the new privacy and security update. This was from September 16th. I don't know if there is a three-month time limit within which you need to agree to it. But a week ago the email account has sent an email, and yesterday it failed on sending one. We agreed to the agreement pop up but it is still not working though.

有人知道我现在可以尝试什么还是导致此错误的原因吗?

Does anybody have any idea what I can try now or what is causing this error?

推荐答案

好的,我在系统上解决了以下问题:

OK, I resolved this issue on my system as follows:

我发送的电子邮件地址与我发送的帐户的电子邮件地址不同,如下所示:

i was sending the message with a different email address to that of the account I was sending from like this:

string from = "email@somwhere.com";

所以我将其更改为:

string from = "thecorrectemailaddress@outlook.com";

所以现在可以正常工作了……开心的日子

so now it works fine ... happy days

MailMessage mail = new MailMessage(from, to);

这篇关于Outlook SMTPClient服务器错误5.3.4 5.2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆