Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmendible/netdumbster
netDumbster is a .Net Fake SMTP Server clone of the popular Dumbster
https://github.com/cmendible/netdumbster
c-sharp hacktoberfest smtp smtp-server unit-testing
Last synced: 7 days ago
JSON representation
netDumbster is a .Net Fake SMTP Server clone of the popular Dumbster
- Host: GitHub
- URL: https://github.com/cmendible/netdumbster
- Owner: cmendible
- Created: 2011-07-11T21:27:49.000Z (over 13 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T10:31:11.000Z (6 months ago)
- Last Synced: 2024-12-28T07:02:10.340Z (21 days ago)
- Topics: c-sharp, hacktoberfest, smtp, smtp-server, unit-testing
- Language: C#
- Homepage:
- Size: 4.07 MB
- Stars: 125
- Watchers: 10
- Forks: 38
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![dotnetcore](https://github.com/cmendible/netDumbster/workflows/dotnetcore/badge.svg)
# netDumbster
**netDumbster** is a .Net Fake SMTP Server clone of the popular **Dumbster**.**netDumbster** is based on the API of **nDumbster** (http://ndumbster.sourceforge.net/default.html) and the nice C# Email Server (CSES) written by Eric Daugherty.
License: http://www.apache.org/licenses/LICENSE-2.0.html
# Usage
Create a netDumbster Server instance:
````csharp
using var server = SimpleSmtpServer.Start(port);
````Check received email count:
````csharp
var count = server.ReceivedEmailCount
````Get the body of the first email received:
````csharp
var smtpMessage = server.ReceivedEmail[0];
var body = smtpMessage.MessageParts[0].BodyData
````Subscribe to the message received event:
````csharp
server.MessageReceived += (sender, args) =>
{
// Get message body.
var body = args.Message.MessageParts[0].BodyData;
};
````