GithubHelp home page GithubHelp logo

edenridgway / ndumbster Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 8.0 865 KB

A significantly enhanced version of nDumbster for .Net 4.0

Home Page: http://ndumbster.sourceforge.net/default.html

License: Apache License 2.0

C# 97.06% CSS 2.94%

ndumbster's People

Contributors

edenridgway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ndumbster's Issues

BCC Header not supported

[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
        }

Create Nuget package

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.

Make dependency onto nuget

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.

ReceivedEmailCount not giving correct value

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?

Support for .NET Core

This doesn't yet support netcoreapp1.1.

This is an excellent package, please update it?

Headers Not Read

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"));
        }

Unstable in IntegrationTesting

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.