The base for this project is netDumpster library and its NuGet package,
as well as the class MailMessageMimeParser of mimeparser.codeplex.com project.
When the email massage is sent to Fake Smtp server host and port, Fake Smtp server receives the message, keeps it in memory and sends it nowhere further.
This site is a web interface for Fake Smtp server. The site allows to see:
- Headers of received email massages as a table.
- The list of email messages in a compact view, with possibility to read the email message body and download attacments.
- Every email message in full view including raw data which was received by Fake Smtp server.
In order to view a separate email message in full view - click on a row in the headers table or on an email message title bar in the list view.
The setting page allows seeing:
- See a name or address for a host of the Fake Smtp server
- Assign a port for the Fake Smtp server to listen and receive email messages.
- Start the Fake Smtp server with the giving port. Herewith early received messages are being deleted from memory.
- Stop the Fake Smtp server. Herewith early received email messages stays in memory and are available for review, while new messages are ignored.
- Clear (delete) early received email messages from memory of the Fake Smtp server.
- Send test email message to the Fake Smtp сервер (with or without attachment).
The regular email message can be sent to the Fake Smtp server using C# code, for instance. Host and Port values can be taken from the settings page:
var email = new System.Net.Mail.MailMessage("from@mail.com", "to1@mail.com, to2@mail.com", "Subject", "Message");
using (var smtpClient = new System.Net.Mail.SmtpClient {Host = "localhost", Port = 5000})
{
smtpClient.Send(email);
}