cosullivan / SmtpServer

A SMTP Server component written in C#
MIT License
692 stars 163 forks source link

Mail sent by Outlook does not fall into application #99

Closed burakkasikci closed 5 years ago

burakkasikci commented 5 years ago

Hi,

SampleMailClient and a self-made console application when I send e-mail SmtpServer application everything works as it should.

"SessionCreated ... .. Mail information .. SessionCompleted ... "

But I could not run it from outlook and windows' own mail application. I have tried the incoming / outgoing e-mail server information like localhost / 127.0.0.1 / 127.0.0.1: 25. I have the type of account imap4 / pop3, I tried them individually and even all the combinations I have tried but not.

Only the information is as follows; "SessionCreated ... SessionCompleted ... "

But the mail information is not coming.

Can you help me with what I've done wrong here?

Example :

My test application like this ;

                MailMessage mail = new MailMessage("from@deneme.com", "to@deneme.com");
                SmtpClient client = new SmtpClient();
                client.Port = 25;
                client.DeliveryMethod = SmtpDeliveryMethod.Network;
                client.EnableSsl = false;
                client.UseDefaultCredentials = false;
                client.Credentials = new System.Net.NetworkCredential("yourusername", "yourpassword");
                client.Host = "127.0.0.1";
                mail.Subject = "this is a test email.";
                mail.Body = "this is my test email body SendDate : " + DateTime.Now;
                client.Send(mail);

And answer is ;

http://prntscr.com/mscxct

My account settings like this ;

http://prntscr.com/mscwf1

And answer is ;

http://prntscr.com/mscyei

cosullivan commented 5 years ago

Hi,

Can you try running the server with tracing as per the following example? https://github.com/cosullivan/SmtpServer/blob/master/Src/SampleApp/Examples/SessionTracingExample.cs

This will give you more information on what the client & server are doing.

It's obviously connecting on port 25 ok if you are getting the session events being raised. Also, IMAP & POP3 are incoming mail protocols so irrelevant to the SmtpServer.

Thanks, Cain.