Mailkit: [Question] How to use RCPT TO command from SmtpClient?

Created on 12 Mar 2020  路  4Comments  路  Source: jstedfast/MailKit

SmtpClient has a method Verify, which banks on the server allowing VRFY command for verifying an e-mail address. In the event it's not allowed though, one can try issuing a RCPT TO command to check if such a recipient exists.

I can do a NoOp command very easily from the client, but I don't see a public RcptTo method to do the above.

Am I missing something here? Do you have plans on adding such a method/extending the usage of the Verify method, if not, could you guide me to implementing it myself?

Thank you!

question

Most helpful comment

Just look at the code for VRFY in SmtpClient.cs and the code that sends RCPT TO as part of sending a message.

All 4 comments

RCPT TO isn't likely tell you if the mailbox exists these days, it will just say OK to everything you give it.

If the server doesn't support VRFY, then it's pretty clear that the server is taking measures to thwart brute force checks by spammers.

Thank you for your reply @jstedfast , but could you perhaps give me some pointers as to how I'd be able to implement this myself?

Just look at the code for VRFY in SmtpClient.cs and the code that sends RCPT TO as part of sending a message.

Thank you as always!

Was this page helpful?
0 / 5 - 0 ratings