This is how I try to send an email:
MailMessage mail = new MailMessage(); mail.From = new MailAddress(" test@test.com "); mail.To.Add(" test1@test.com "); mail.Subject = "Subject"; mail.Body = "Body"; SmtpClient smtp = new SmtpClient("localhost", 25); smtp.UseDefaultCredentials = true; smtp.Send(mail);
In smtp4dev I configured the localhost domain name and the port number is 25 , all other settings that I left in their default values.
When I try to send an email - it sends it successfully, however I do not see this message, the session logs also do not say anything useful:
220 localhost smtp4dev ready EHLO MobileVladimirs 250-Nice to meet you. 250-8BITMIME 250-STARTTLS 250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS 250-AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS 250 SIZE MAIL FROM:< test@test.com > 250 Okey dokey RCPT TO:< test1@test.com > 250 Recipient accepted RSET 250 Rset completed
Please tell me where I am mistaken, or explain how I can find out what happens with the email that I sent?
source share