如何测试从asp.net开发机器上发送电子邮件? [英] How to test sending emails from asp.net on development machine?
本文介绍了如何测试从asp.net开发机器上发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何做到这一点?该SMTP类引发错误dev的机器约没有找到SMTP服务器。有没有一种方法来测试开发机器上发送电子邮件?
How do I accomplish this? The SMTP class throws error on dev machine about not finding an SMTP server. Is there a way to test sending emails on development machine?
推荐答案
肖恩,
直接从我的web.config:
Straight from my web.config:
<smtp deliveryMethod="SpecifiedPickupDirectory">
<network host="ignored" />
<specifiedPickupDirectory pickupDirectoryLocation="c:\email_c#" />
</smtp>
这工作得很好,只要能够审查电子邮件说得到保存到 pickupDirectoryLocation 目录。
试试看吧...
这篇关于如何测试从asp.net开发机器上发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文