如何在 Vista 上设置 smtp,以便可以从本地 picup 目录使用 System.Net.Mail?
我尝试使用以下解决方案(也可以在这里找到:如何在 Vista 上设置 smtp 以便可以使用 System.Net.Mail?),但我收到“无法获取 IIS 拾取目录”。我知道我指向一个现有目录,并且我的 web.config 设置正确,我是否需要在该目录上设置权限才能写入该目录?
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory
pickupDirectoryLocation="c:\maildrop"/>
</smtp>
</mailSettings>
I've tried using the below solution (also found here: How do I set up smtp on Vista so I can use System.Net.Mail?) but I receive "Cannot get IIS pickup directory". I know I am pointing to an existing directory and my web.config are set up correctly, are there permissions I need to set up on the directory before I can write to it?
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<specifiedPickupDirectory
pickupDirectoryLocation="c:\maildrop"/>
</smtp>
</mailSettings>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否检查过
maildrop
文件夹的文件权限?您可以为所有用户启用写入并查看是否有效。如果你只是想让 IIS 写入它,我认为用户是 ASPNET,但我可能是错的。另外这个答案似乎在末尾显示一个“\”目录路径(我希望 ASP.NET 能够理解这一点)
Have you checked the file permissions on the
maildrop
folder? You can enable write for all users and see if that works. If you just want IIS to write to it, I think the user is ASPNET, but I might be wrong on that.Also this answer seems to show a "\" at the end of the directory path (I would hope asp.net would understand that though)