简体   繁体   English

SMTP Windows Server 2008 Asp.net提取目录

[英]SMTP windows server 2008 Asp.net Pickup Directory

I have configured an smtp server over a IIS 6.0 in windows server 2008. I have already granted: -Administrators - NT AUTHORITY\\LOCAL SERVICE - NT AUTHORITY\\NETWORK SERVICE - IUSR_MACHINE_NAME - MY Domain User 我已经在Windows Server 2008中的IIS 6.0上配置了一个smtp服务器。我已经授予:-管理员-NT AUTHORITY \\ LOCAL服务-NT AUTHORITY \\ NETWORK服务-IUSR_MACHINE_NAME-我的域用户

The folder structure for the SMTP service is the following: - Badmail - Drop - Pickup - Queue SMTP服务的文件夹结构如下:-死信-丢弃-提取-队列

I have a mvc application that send emails via pickup directory, the configuration is the following: 我有一个通过提取目录发送电子邮件的mvc应用程序,其配置如下:

<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory pickupDirectoryLocation="E:\Email\dev\Pickup" xdt:Transform="Replace"  />
</smtp>

the problem is when I set up the pickup directory the application never writes the email files to that specific folder, the odd thing is that I'm not getting any exception either, I guess this could be an issue related to some user permissions but I already have granted the full control to everyone in that folder as well. 问题是当我设置提取目录时,应用程序从不将电子邮件文件写入该特定文件夹,奇怪的是,我也没有任何异常,我想这可能是与某些用户权限有关的问题,但是我已经对该文件夹中的每个人都授予了完全控制权限。

The fact is that I'm not getting get any email. 事实是我没有收到任何电子邮件。

this environment isn't for production, and is just for testing purposes, Any Advice? 此环境不是用于生产,而只是用于测试目的,有什么建议吗?

Try below code, this works for me, I have been using it in my project and when sending mail, the eml file gets created here. 尝试下面的代码,这对我有用,我在项目中一直在使用它,并且在发送邮件时,将在此处创建eml文件。

  <system.net>
        <mailSettings>
          <!-- Method#2: Dump emails to a local directory -->
          <smtp from="admin@abc.com" deliveryMethod="SpecifiedPickupDirectory">
            <network host="localhost" />
            <specifiedPickupDirectory pickupDirectoryLocation="F:\Project\Mails\" />
          </smtp>
        </mailSettings>
      </system.net>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM