Sending Mail SMTP Server UnKnown

G

Guest

Hi
I want to be able to send an error log to use, from a un-supervised PC that
runs our application 24x7 (on client's site). Some of our clients use
Exchange Server, but the PC that runs our s/w is not configured with A MAPI
client (i.e. Outlook), what is the best way to send an external email without
user intervention and without knowing the SMTP server's address?
 
T

Tony B

Richard said:
Hi
I want to be able to send an error log to use, from a un-supervised PC that
runs our application 24x7 (on client's site). Some of our clients use
Exchange Server, but the PC that runs our s/w is not configured with A MAPI
client (i.e. Outlook), what is the best way to send an external email without
user intervention and without knowing the SMTP server's address?

You could use OpenSMTP.NET http://sourceforge.net/projects/opensmtp-net/
to send the email.

As for which SMTP server to use; if you don't have an SMTP server you
can send through you could perform an MX lookup on the domain you are
sending the email to, then sent the mail directly to the mail server
that accepts mail for the domain.

Tony
 
G

Guest

In addition to Tony's comments depending on what version of .Net you are
working with you can also use the classes in System.Web.Mail in the 2.0
framework. I believe it will do the MX record lookup for you behind the
scenes so you don't need to do anything to figure out the default SMTP server.
 
T

Tony B

yoga said:
In addition to Tony's comments depending on what version of .Net you are
working with you can also use the classes in System.Web.Mail in the 2.0
framework. I believe it will do the MX record lookup for you behind the
scenes so you don't need to do anything to figure out the default SMTP server.

Hi Yoga, the new classes in 2.0 are in System.Net.Mail. Out of habit I
still tend to use OpenSMTP.NET so the new classes didn't occur to me but
they probably would do all that is required.

As far as I'm aware these classes don't perform MX lookups, that is
usually handled by the SMTP server that you pass the email to.

Tony
 
G

Guest

That's right. Getting my namespaces mixed up.

I could have sworn that I wrote a app a little while back with the new API
and didn't provide a SMTP server and message were still processed. I'll have
to go back and check to make sure I'm not imagining things.
 

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