1
Vote

Crashes when using credentials

description

var sc = new SmtpClient {
            Host = "localhost",
            UseDefaultCredentials = true,
            Credentials = new NetworkCredential("whatever", "andMorewhatevers"),
            Port = 25,
            EnableSsl = true
        };
        var mail = new MailMessage("tester@me.com", "testee@me.com") {
            Subject = "My subject",
            Body = "My body"
        };

        sc.Send(mail);
this crashes latest smtp4dev with an ArgumentNullException

comments