What am I doing wrong?

Dec 15, 2009 at 2:49 PM

I'm just trying to send email with smtp4dev. Smtp4dev is up and running using all the default options. I granted it full rights through the Windows Firewall (Windows 7). Using this code:

 

    class Program {
        static void Main(string[] args) {
            SmtpClient client = new SmtpClient("localhost", 25);
            client.Send("dummymail@localhost", "scott@localhost", "dummy test", "body test");
            Console.WriteLine("done");
            Console.ReadLine();
        }
    }

    class Program {
        static void Main(string[] args) {
            SmtpClient client = new SmtpClient("localhost", 25);
            client.Send("dummymail@localhost", "scott@localhost", "dummy test", "body test");
        }
    }

 

It throws an SmtpException: "Smtp server returned an invalid response." The status code is GeneralFailure. Am I missing something basic here?

 

Coordinator
Dec 15, 2009 at 9:09 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.