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

      <small id='EHamD'></small><noframes id='EHamD'>

    2. <tfoot id='EHamD'></tfoot>

        通过 C# 应用程序接收电子邮件和下载附件

        Receiving email and downloading attachment through a C# Application(通过 C# 应用程序接收电子邮件和下载附件)
          <i id='2n9ur'><tr id='2n9ur'><dt id='2n9ur'><q id='2n9ur'><span id='2n9ur'><b id='2n9ur'><form id='2n9ur'><ins id='2n9ur'></ins><ul id='2n9ur'></ul><sub id='2n9ur'></sub></form><legend id='2n9ur'></legend><bdo id='2n9ur'><pre id='2n9ur'><center id='2n9ur'></center></pre></bdo></b><th id='2n9ur'></th></span></q></dt></tr></i><div id='2n9ur'><tfoot id='2n9ur'></tfoot><dl id='2n9ur'><fieldset id='2n9ur'></fieldset></dl></div>
          <legend id='2n9ur'><style id='2n9ur'><dir id='2n9ur'><q id='2n9ur'></q></dir></style></legend>

              <tbody id='2n9ur'></tbody>

            1. <small id='2n9ur'></small><noframes id='2n9ur'>

                <tfoot id='2n9ur'></tfoot>
                • <bdo id='2n9ur'></bdo><ul id='2n9ur'></ul>
                • 本文介绍了通过 C# 应用程序接收电子邮件和下载附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试实现一个 WPF 应用程序,它可以接收发送到特定电子邮件地址的邮件.场景是,用户将 PPT 文件作为附件发送到特定的电子邮件地址,我的 WPF 应用程序将侦听此电子邮件,一旦收到电子邮件,它将下载附件并将其保存到硬盘驱动器.

                  I am trying to implement a WPF application which can receive the mails sent to a specific email address. The scenario is that, the user will send a PPT file as an attachment to a specific email address, and my WPF application will listen to this email and once it receives the email, it will download the attached file and saves it to the hard drive.

                  我看了一点,但我发现 System.Net.Mail 只支持通过使用 System.Net.Mail.SmtpClient 类的应用程序发送电子邮件.谁能建议我如何在 WPF 和 C# 中执行此操作.

                  I looked a bit, but all I found was that the System.Net.Mail only supports sending emails through an application using System.Net.Mail.SmtpClient class. Can anyone suggest me how to do this in WPF and C#.

                  提前致谢!

                  推荐答案

                  var client = new POPClient();
                  client.Connect("pop.gmail.com", 995, true);
                  client.Authenticate("admin@bendytree.com", "YourPasswordHere");
                  var count = client.GetMessageCount();
                  Message message = client.GetMessage(count);
                  Console.WriteLine(message.Headers.Subject);
                  

                  一个简单的提示,您可以遵循:https://joshwright.com/tips/tips-sending-receiving-email-in-csharp/

                  A simple tip, that you can follow: https://joshwright.com/tips/tips-sending-receiving-email-in-csharp/

                  这篇关于通过 C# 应用程序接收电子邮件和下载附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 列表框上的取消选择)
                  <i id='KvsUt'><tr id='KvsUt'><dt id='KvsUt'><q id='KvsUt'><span id='KvsUt'><b id='KvsUt'><form id='KvsUt'><ins id='KvsUt'></ins><ul id='KvsUt'></ul><sub id='KvsUt'></sub></form><legend id='KvsUt'></legend><bdo id='KvsUt'><pre id='KvsUt'><center id='KvsUt'></center></pre></bdo></b><th id='KvsUt'></th></span></q></dt></tr></i><div id='KvsUt'><tfoot id='KvsUt'></tfoot><dl id='KvsUt'><fieldset id='KvsUt'></fieldset></dl></div>
                    <bdo id='KvsUt'></bdo><ul id='KvsUt'></ul>

                  • <legend id='KvsUt'><style id='KvsUt'><dir id='KvsUt'><q id='KvsUt'></q></dir></style></legend>
                      <tfoot id='KvsUt'></tfoot>

                        <small id='KvsUt'></small><noframes id='KvsUt'>

                            <tbody id='KvsUt'></tbody>