如何通过SmtpClient实际发送转储到收件目录的电子邮件

如何通过SmtpClient实际发送转储到收件目录的电子邮件,smtp,smtpclient,Smtp,Smtpclient,这是我在web.config中设置smtp客户端的方式: <system.net> <mailSettings> <smtp from="&quot;SSA Notifications&quot; &lt;email@example.com&gt;" deliveryMethod="SpecifiedPickupDirectory"> <specifiedPickupD

这是我在web.config中设置smtp客户端的方式:

   <system.net>
    <mailSettings>
        <smtp from="&quot;SSA Notifications&quot; &lt;email@example.com&gt;" deliveryMethod="SpecifiedPickupDirectory">
            <specifiedPickupDirectory pickupDirectoryLocation="e:\pickup"/>             
        </smtp>
    </mailSettings>
   </system.net>

因此,当我使用SmtpClient发送电子邮件时,它实际上并不发送电子邮件,而是将其转储到皮卡文件夹中——这是出于设计,主要用于测试目的。现在,如果我想让这些生成的电子邮件真正被发送,我该怎么办?我不在乎它是一些代码还是powershell脚本?

您可以运行worker线程从该目录中提取eml,然后从那里发送。或者您可以使用第三方代理从该文件夹发送电子邮件

分拣目录适用于第三方电子邮件客户端软件