Does use the loopback address (127.0.0.1) instead of the name (localhost)
help? Or, what about using the local machine name? I believe that should
resolve to your IP in most cases.

SmtpMail.SmtpServer = System.Environment.MachineName;

Erick

----- Original Message -----
From: "John" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 09, 2002 1:14 PM
Subject: Re: [DOTNET] Could not access 'CDO.Message' object


> Yeah, guess I could.
>
> Just don't like adding bits like that to my code.
>
> e.g I have a pc and a laptop and the files are checked into SourceSafe.
>
> I check out the files on my laptop and the local smtp server doesn't work
> so I extend the Switch statement.
>
> I check the file back-in.  Someone else checks out the file and it doesn't
> work, so they extend the Switch statement.
>
> Could really bloke my code and it doesn't seem to be best practice.
>
> I know I could have one development server being the main test development
> server but some developers use laptops as they travel quite a bit and it
> still doesn't seem like the ideal solution.
>
> Is this how the class is supposed to act?
>
> Thanks for the suggestion anyway.
>
> John
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to