• <bdo id='6KdtG'></bdo><ul id='6KdtG'></ul>

      <small id='6KdtG'></small><noframes id='6KdtG'>

      <i id='6KdtG'><tr id='6KdtG'><dt id='6KdtG'><q id='6KdtG'><span id='6KdtG'><b id='6KdtG'><form id='6KdtG'><ins id='6KdtG'></ins><ul id='6KdtG'></ul><sub id='6KdtG'></sub></form><legend id='6KdtG'></legend><bdo id='6KdtG'><pre id='6KdtG'><center id='6KdtG'></center></pre></bdo></b><th id='6KdtG'></th></span></q></dt></tr></i><div id='6KdtG'><tfoot id='6KdtG'></tfoot><dl id='6KdtG'><fieldset id='6KdtG'></fieldset></dl></div>
      <tfoot id='6KdtG'></tfoot>

      1. <legend id='6KdtG'><style id='6KdtG'><dir id='6KdtG'><q id='6KdtG'></q></dir></style></legend>

        5.7.57 SMTP - 在 MAIL FROM 错误期间,客户端未通过身份验证发送匿名邮件

        时间:2023-10-06
            <bdo id='BoBik'></bdo><ul id='BoBik'></ul>
          • <tfoot id='BoBik'></tfoot>

              1. <small id='BoBik'></small><noframes id='BoBik'>

                  <i id='BoBik'><tr id='BoBik'><dt id='BoBik'><q id='BoBik'><span id='BoBik'><b id='BoBik'><form id='BoBik'><ins id='BoBik'></ins><ul id='BoBik'></ul><sub id='BoBik'></sub></form><legend id='BoBik'></legend><bdo id='BoBik'><pre id='BoBik'><center id='BoBik'></center></pre></bdo></b><th id='BoBik'></th></span></q></dt></tr></i><div id='BoBik'><tfoot id='BoBik'></tfoot><dl id='BoBik'><fieldset id='BoBik'></fieldset></dl></div>
                    <tbody id='BoBik'></tbody>

                • <legend id='BoBik'><style id='BoBik'><dir id='BoBik'><q id='BoBik'></q></dir></style></legend>
                  本文介绍了5.7.57 SMTP - 在 MAIL FROM 错误期间,客户端未通过身份验证发送匿名邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我必须使用我的网络应用程序发送邮件.鉴于以下代码显示 SMTP 服务器需要安全连接或客户端未通过身份验证.服务器响应是:

                  I have to send mails using my web application. Given the below code showing The SMTP server requires a secure connection or the client was not authenticated. The server response was:

                  5.7.57 SMTP;在 MAIL FROM 期间,客户端未通过身份验证发送匿名邮件.

                  5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM.

                  帮助我找到合适的解决方案.谢谢.

                  Help me to find a proper solution. Thank you.

                  代码:

                  protected void btnsubmit_Click(object sender, EventArgs e)
                   {
                  
                     Ticket_MailTableAdapters.tbl_TicketTableAdapter tc;
                     tc = new Ticket_MailTableAdapters.tbl_TicketTableAdapter();
                     DataTable dt = new DataTable();
                     dt = tc.GetEmail(dpl_cate.SelectedValue);
                     foreach (DataRow row in dt.Rows)
                      {
                      string eml = (row["Emp_Email"].ToString());
                      var fromAddress = "emailAddress";
                      var toAddress = eml;
                      const string fromPassword = "*****";
                      string body = "Welcome..";
                   // smtp settings
                      var smtp = new System.Net.Mail.SmtpClient();
                         {
                           smtp.Host = "smtp.office365.com";
                           smtp.Port = 587;
                           smtp.EnableSsl = true;
                  
                           smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
                           smtp.Credentials = new NetworkCredential(fromAddress, fromPassword);
                           smtp.UseDefaultCredentials = false;
                           smtp.Timeout = 600000;
                         }
                    // Passing values to smtp object
                       smtp.Send(fromAddress, toAddress, subject, body);
                       }
                    } 
                   }
                  

                  推荐答案

                  您似乎将 From 地址作为 emailAddress 传递,这不是正确的电子邮件地址.对于 Office365,From 需要是 Office365 系统上的真实地址.

                  You seem to be passing the From address as emailAddress, which is not a proper email address. For Office365 the From needs to be a real address on the Office365 system.

                  如果您将电子邮件地址硬编码为 From 和 Office 365 密码,则可以验证这一点.

                  You can validate that if you hardcode your email address as the From and your Office 365 password.

                  当然不要把它留在那里.

                  Don't leave it there though of course.

                  这篇关于5.7.57 SMTP - 在 MAIL FROM 错误期间,客户端未通过身份验证发送匿名邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使 SMTP 在 C# 中进行身份验证 下一篇:SmtpException:无法从传输连接读取数据:net_io_connectionclosed

                  相关文章

                • <small id='jxibr'></small><noframes id='jxibr'>

                • <legend id='jxibr'><style id='jxibr'><dir id='jxibr'><q id='jxibr'></q></dir></style></legend>
                  1. <tfoot id='jxibr'></tfoot>
                      <bdo id='jxibr'></bdo><ul id='jxibr'></ul>

                    1. <i id='jxibr'><tr id='jxibr'><dt id='jxibr'><q id='jxibr'><span id='jxibr'><b id='jxibr'><form id='jxibr'><ins id='jxibr'></ins><ul id='jxibr'></ul><sub id='jxibr'></sub></form><legend id='jxibr'></legend><bdo id='jxibr'><pre id='jxibr'><center id='jxibr'></center></pre></bdo></b><th id='jxibr'></th></span></q></dt></tr></i><div id='jxibr'><tfoot id='jxibr'></tfoot><dl id='jxibr'><fieldset id='jxibr'></fieldset></dl></div>