Query on the SMTPClient class

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.
 
E

Eugene Mayevski

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
 
J

james

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top