How to test SMTP server connection in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • romcab
    New Member
    • Sep 2007
    • 108

    How to test SMTP server connection in C#

    Hi guys,
    I would like to ask your idea on how to test my SMTP server connection. I created a form where you will input SMTP info like server, port, username and password. At the end of it, I added a test connection button. Right now, I can send email using SmtpClient and MailMessage class. I tried using socket to test the connection but our server don't accept connection. Hope you can help me guys.

    Thanks in advance.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Wouldn't the SmtpClient be a good test?

    Comment

    Working...