How can i check smtp server without sending email? [duplicate]

流过昼夜 提交于 2019-12-22 17:46:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!