Using SMTP Client

  • Thread starter Thread starter Lilith
  • Start date Start date
L

Lilith

Would I be correct in assuming that the SMTP Client that's part of
..NET 2.0 is incapable of handling MX lookups?

TIA,
Lilith
 
Lilith said:
Would I be correct in assuming that the SMTP Client that's part of
.NET 2.0 is incapable of handling MX lookups?

You are correct. You have to assign a SMTP server to the SmtpClient, and
this server will do the MX lookup to relay the message. The SmtpClient
doesn't know how to do it by itself.
 
You are correct. You have to assign a SMTP server to the SmtpClient, and
this server will do the MX lookup to relay the message. The SmtpClient
doesn't know how to do it by itself.

Thank you. That actually makes the coding easier. :-)
 
Lilith,

I wouldn't say it is incapable, but rather, it doesn't have to, as the
SMTP server that sends the mail for you will do the actual lookup.

If you have the need to perform an MX lookup, here is an article with
some sample code:

http://www.csharphelp.com/archives/archive43.html

Thank you. I'm working on a program that monitors one SMTP server and
sends, potentially, multiple alerts via at least two paths to devices
for notification of problems. Though we have two servers we can use
to relay, I like to write my programs such that if others might find a
need for it, they can use it. But they may not have a relay to depend
on, so it's good to either know the limitations or work around them.
 

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

Back
Top