I've been wrestling with relaying .NET STMP messages beyond our local domain since around 3:00 this afternoon. It's now around 5:30. I know, it's a Friday, but darn it, when something doesn't work on one of my servers--whether that particular something is in use or not (and this happens to be not in use)--it bugs me and has to be fixed.
We all have CDO email procs and sometimes need to send to non-domain addresses. My classic ASP CDO procs worked fine, and am quite certain my .NET 1.0 CDO proces did, but not .NET 1.1. I knew it had something to do with .NET security, and tried impersonation, changing the username to SYSTEM in the machine.config, adding ASPNET to the SMTP admin group, etc. Then I found the Golden Google Egg below.
SmtpMail.SmtpServer = ""; // I had it pointing to the exchange server...
It makes perfect sense now. You must use LOCALHOST as your smtpserver and let IT do the forwarding for you.
Ahhh, yes. Now I can relax and enjoy my weekend.
Thank you Charles Fineblum!
From: Charles Fineblum (charle1@comcast.net)
Subject: Re: SMTP error: Could not access 'CDO.Message' object
Newsgroups: microsoft.public.dotnet.languages.csharp
Date: 2003-08-18 11:39:20 PST
Hi Chad:
"You need to use localhost and set the forwarding of your local SMTP server to your main mail router server"
By setting SmtpMail.SmtpServer = "", it should use local smtp server. How do I set forwarding to main mail server? I don't see this setting in SMTP props. I also tried adding the ASP.net account in security tab of SMTP prop, but still same error.
Thanks,
Charlie