Query on the SMTPClient class

  • Thread starter Thread starter james
  • Start date Start date
J

james

Hi,
Does anyone know if it is possible to connect to an SMTP server without
actually sending a mail (specifically to retrieve the mail server "welcome"
response)?

I am looking to basically pick up the same as you would see if you did a
"telnet <mailserver> 25" from a command prompt.

Thanks
James.
 
Hello!
You wrote on Mon, 17 Jul 2006 10:07:59 +0100:

j> I am looking to basically pick up the same as you would see if you did a
j> "telnet <mailserver> 25" from a command prompt.

If you just need a greeting string, then why not just connect to the server
with Socket class and receive whatever is sent?

With best regards,
Eugene Mayevski
http://www.SecureBlackbox.com - the comprehensive component suite for
network security
 
Eugene Mayevski said:
Hello!
You wrote on Mon, 17 Jul 2006 10:07:59 +0100:

j> I am looking to basically pick up the same as you would see if you did
a
j> "telnet <mailserver> 25" from a command prompt.

If you just need a greeting string, then why not just connect to the
server with Socket class and receive whatever is sent?

Yup, that's my backup plan - was just hoping I could do it with the existing
smtp bit I already have to save some extra code, but not to worry!

Thanks
James.
 
Back
Top