edenridgway / ndumbster Goto Github PK
View Code? Open in Web Editor NEWA significantly enhanced version of nDumbster for .Net 4.0
Home Page: http://ndumbster.sourceforge.net/default.html
License: Apache License 2.0
A significantly enhanced version of nDumbster for .Net 4.0
Home Page: http://ndumbster.sourceforge.net/default.html
License: Apache License 2.0
[Test]
public void bcc_and_cc_test() {
var smtpServer = SimpleSmtpServer.Start(25);
using (var client = new SmtpClient { Host = "localhost", Port = 25 }) {
var msg = new MailMessage("[email protected]", "[email protected]");
msg.Bcc.Add("[email protected]");
msg.CC.Add("[email protected]");
client.Send(msg);
}
var waitLoopCount = 0;
while (smtpServer.ReceivedEmailCount == 0 && waitLoopCount < 100) {
waitLoopCount++;
Thread.Sleep(300);
}
var email = smtpServer.ReceivedEmail.First();
Assert.AreEqual("[email protected]", email.Headers["Cc"]);
Assert.AreEqual("[email protected]", email.Headers["Bcc"]); // THIS FAILS
}
As this project does not seem to be maintained anymore (ref #8), it would be great to archive this project.
You can do so on GitHub.
Also maybe link to the modern alternative: https://github.com/cmendible/netDumbster
You can download and unpack from this https://www.nuget.org/packages/nDumbster/. It has initial spec.
Seems this is old sf code, as per link to project site.
But fix Authors with all participants.
I contacted owner via linkedin, may be he will answer.
He used version 1.0.0.... So need to update it to something like 1.0.3.
Using of specific version of OpenPop.NET should be via Nuget. But I suggest to change OpenPop.NET for MimeKit cause it several times faster with more capabilites.
I'm using this library for the unit test development and facing an issue that The service is not stopped property So that the Auto build is running forever.
I moved from the original nDumbster to this version due to slow test times. Whilst the performance of this version is much better, I get the wrong value returned from ReceivedEmailCount().
Is this a known issue?
This doesn't yet support netcoreapp1.1
.
This is an excellent package, please update it?
Hi Eden,
I've been recently adding headers to my mail messages, but found that nDumbster does not read them in the incoming messages.
I am not sure if I am doing something wrong or not. Can you confirm that this is a problem with nDumbster, or is it something I am not doing right?
I created a simple test to demonstrate this:
[TestMethod, TestCategory("Integration")]
public void WhenUsingHeaders_ThenHeadersReturned()
{
using (var client = new SmtpClient { Host = "localhost", Port = 25 })
{
var msg = new MailMessage("[email protected]", "[email protected]", "some subject", "some body");
msg.Headers.Add("foo", "bar");
client.Send(msg);
}
int waitLoopCount = 0;
var smtpServer = SimpleSmtpServer.Start(25)
while (smtpServer.ReceivedEmailCount == 0 && waitLoopCount < 100)
{
waitLoopCount++;
Thread.Sleep(300);
}
var email = smtpServer.ReceivedEmail.First();
Assert.AreEqual("some body", email.Body);
Assert.AreEqual("some subject", email.Subject);
Assert.AreEqual("bar", email.Headers.Get("foo"));
}
I had originally forked this repo so I can get signed (strongnamed) bits to use on our project.
That is done now, but I have an issue using this code in integration tests.
I am running several automated integration tests that send emails, amoung hundreds of others that don't, and I use the SmtpServer to check the content of those that do.
I am using MSTEST as the test framework.
I am creating the SmtpServer (calling SimpleSmtpServer.Start(25)) at the start of the test run (i.e. on [AssemblyInitialize])
Then for each test (before each test runs), I am calling smtpServer.ClearReceivedEmail().
In each test I am doing a: while(SmtpServer.ReceivedEmailCount == 0) loop with a Thread.Sleep() until a message arrives. When the message arrives I process it, by accessing the SmtpServer.ReceivedEmail property.
The problem is that some of my tests pass some of the time, an other times not.
I can get them to pass by rerunning them over and over again, and eventually they pass. I cannot pin-point the specific conditions that make them pass, but it seems to depend on some combination of the tests I run in the test run, which makes using this code very unreliable, and hard to diagnose. Seems like a concurrency problem perhaps?
Wondering if you might have some clue as to what might be going on? Perhaps your modifications have changed the behavior of the original nDumster code? Perhaps some memory or dispose problem?
Any clues?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.