问题
I had web application that users can set SMTP server information (server/host, SMTP Port, Username, Password, EmailAddress, usedSSL). i need when user set information validatre server without sending email and check Is smtp information valid or not?
I found website that works perfect and check is SMTP server alive (but not authentication check).. http://mxtoolbox.com/diagnostic.aspx
Edit 1:
Tanx @Dieter DHoker help me to find Testing SMTP server is running via C# in comments...
Is there anyway that i check authentication information (username & password & email address) as i need to check all smtp information is valid or not? that i asked before..
回答1:
There's no username and password in SMTP (see rfc 821), so there's no way to test that. You could use a MAIL FROM and RCPT TO sequence, but not send any DATA, to see if you'll be allowed to send mail with the given information, without sending an actual mail.
来源:https://stackoverflow.com/questions/17319276/how-can-i-check-smtp-server-without-sending-email