development smtp server for windows [closed]

泪湿孤枕 提交于 2019-11-27 17:36:52
marc_s

There are a few:

Or you can also set it up in your web.config to just store the e-mails in the file system (the config way of what "silky" has proposed in code):

<system.net>  
   <mailSettings>  
      <smtp deliveryMethod="SpecifiedPickupDirectory">  
         <specifiedPickupDirectory 
             pickupDirectoryLocation="c:\temp\mails\"/>  
      </smtp>  
   </mailSettings>  
</system.net>  

Marc

I know that this is an old post however I also know about http://smtp4dev.codeplex.com/ which I would also recommend. It sits on you task bar and then pops up when you send emails to it. It allows you to then examine the email in quite some depth.

Noon Silk

-- Edit:

This advice only valid if you're using .NET

Check this out. If you set it appropriately, it will just store your emails on disk :)

SmtpClient client = ...;
client.PickupDirectoryLocation = @"c:\foo\emails\"; //"
client.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;

-- Edit

Just in case some people don't get it, this means you don't need another SMTP server for test/dev, you just set the variable appropriately.

-- Edit

For completeness, as marc_s shows below, you can set this in configs nicely via:

<system.net>  
   <mailSettings>  
      <smtp deliveryMethod="SpecifiedPickupDirectory">  
         <specifiedPickupDirectory 
             pickupDirectoryLocation="c:\foo\emails\" />  
      </smtp>  
   </mailSettings>  
</system.net>

The Python smtpd module has a DebuggingServer which prints all messages to stdout. If you redirect them to a file, you should be done.

We used Mailtrap for this. It give you remote smtp server account and direct access to all mails in it. So you just enter given smtp credential in your application and after that all email sent by your system will be visible on mailtrap. And you can easily look source code of mail, and download it to your local system. You can see example here

On mailtrap you can have as many smtp account as you want( different account for different application environments, or different application) Also you can manage access to your account ( so only trusted people will se your emails) and you can forward some emails to real email addresses.

Santosh Gokak

Below are the links i found

Use depending on the Language and Platform of your choice.

There is also an earlier post for .NET Testing SMTP with .net

Papercut (http://papercut.codeplex.com/discussions) is the simplest and most elegant one so far. Simple exe file that listens to port 25 and displays emails.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!