26

i need to demo an application on my laptop running windows 7 enterprise. The application is supposed to send mail. How can i setup a local smtp server to send mail from and be able to recieve it in my outlook on the machine. I need to be able to do this while not connected to the internet for the demo.

hamza h
  • 355
  • 1
  • 4
  • 12
  • 1
    Possible duplicate of [Local SMTP server that can be used for testing and development - won't actually deliver mail](http://stackoverflow.com/questions/4177990/local-smtp-server-that-can-be-used-for-testing-and-development-wont-actually) (and note that that duplicate is also closed, because it's off-topic...). – Amos M. Carpenter May 08 '17 at 02:05

6 Answers6

15

Local smtp only: smtp4dev (similar to papercut)
The application catches everything sent to it, but does not send emails over the internet.

lennartvdd
  • 495
  • 3
  • 8
13

XMail or hMailServer should do the trick.

More details on this previous question.

Community
  • 1
  • 1
Ismael Ghalimi
  • 3,515
  • 2
  • 22
  • 25
12

Papercut is pretty active (last release on Jun 25, 2015):

Ever need to test emails from an application or web site but don't want them accidently being sent or having to deal with the hassle of setting up a test email server? Papercut is a quick email viewer with a built-in SMTP server designed to only receive messages. It doesn't enforce any restrictions how you send your email. It allows you to view the whole email-chilada: body, html, headers, attachment down to the naughty raw bits. It can be set to run on startup and sits quietly minimized in the tray giving you a balloon popup when a new message arrives.

You can also try smtp4dev:

A dummy SMTP server for Windows, Linux, Mac OS-X (and maybe elsewhere where .NET Core is available)

alexandrul
  • 12,856
  • 13
  • 72
  • 99
  • i tried this but there is no help at all for how to set this up included with the software or on that link. the options menu in papercut lets you pick a couple of ips but apparently more configuration is required because pointing my smtp client at those values did not work. – Mike Corcoran Dec 11 '17 at 19:24
  • @MikeCorcoran in my case I have set Papercut to listen on all IP addresses (the `Any` option) and then I've just set the IP and port in my jenkins instance, nothing else was required. – alexandrul Dec 12 '17 at 08:07
3

You can also (for a demo) user the 'specifiedPickupDirectory' setting to leverage the same code, but drop the email message off to a local folder, alleviating the need for an actual SMTP server, but being able to demonstrate that the email is generated as expected.

MSDN: http://msdn.microsoft.com/en-us/library/ms164241.aspx

Glenn Ferrie
  • 10,290
  • 3
  • 42
  • 73
2

As for me the best option is https://www.npmjs.com/package/maildev

A painless smtp server running on node. Therefore you need to install node, but it actually send an email to any smtp server.

Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164
0

You can send email using Telnet or implement the protocol using socket programming.

Refer to http://www.softwareandfinance.com/Visual_CPP/TelnetEmail.html