• <bdo id='jWa5A'></bdo><ul id='jWa5A'></ul>

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

      1. 如何通过 IIS7 发送电子邮件?

        How to send email through IIS7?(如何通过 IIS7 发送电子邮件?)
          <bdo id='fbjMF'></bdo><ul id='fbjMF'></ul>

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

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

                  本文介绍了如何通过 IIS7 发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在我的 Windows 7 机器上使用 IIS7 设置 SMTP 服务器.我已将其设置为将电子邮件发送到 localhost,端口 25,没有身份验证.但是当我尝试从我的 C# 程序以编程方式连接时,我收到一个错误:

                  I'm trying to set up a SMTP server on my Windows 7 machine in IIS7. I have set it to "Deliver email to localhost, port 25, no authentication. But when I try to connect programmatically from my C# program, I get an error:

                  发送邮件失败",内部异常无法建立连接,因为目标机器主动拒绝了它127.0.0.1:25

                  Failure sending mail", inner exception "No connection could be made because the target machine actively refused it 127.0.0.1:25

                  public static void SendEmail(MailMessage m) {
                    var smtp = new SmtpClient {
                      Host = "localhost",
                      Port = 25,
                      UseDefaultCredentials = true,
                    };
                    smtp.Send(m);
                  }
                  

                  为什么?我还需要打开什么其他秘密开关?

                  Why? What other secret switch do I have to flip?

                  推荐答案

                  我发现最好的方法是使用 SMTP4Dev,它会侦听电子邮件,并向您显示已发送"的内容,但实际上并未发送任何内容.非常适合测试!

                  Best method I found was to use SMTP4Dev, which listens for emails, and shows you what was "sent", but doesn't actually send anything. Great for testing!

                  这篇关于如何通过 IIS7 发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Populate ListBox with a IEnumrable on another thread (winforms)(在另一个线程(winforms)上使用 IEnumrable 填充 ListBox)
                  listbox selected item give me quot; System.Data.DataRowViewquot; , C# winforms(列表框选择的项目给我quot;System.Data.DataRowView, C# Winforms)
                  Cannot remove items from ListBox(无法从列表框中删除项目)
                  Preventing ListBox scrolling to top when updated(更新时防止列表框滚动到顶部)
                  Drag and drop from list to canvas on windows phone with MVVM(使用 MVVM 在 Windows 手机上从列表拖放到画布)
                  Deselection on a WPF listbox with extended selection mode(具有扩展选择模式的 WPF 列表框上的取消选择)
                2. <small id='cGxBC'></small><noframes id='cGxBC'>

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

                            <tbody id='cGxBC'></tbody>
                          • <tfoot id='cGxBC'></tfoot>