Try setting the SMTP server prior to sending the mail.
System.Web.Mail.SmtpServer = "www.yourserver.com";

Signature
Regards,
Dennis JD Myr?n
Oslo Kodebureau
Sorry;
System.Web.Mail.SmtpMail.SmtpServer = "www.yourserver.com";

Signature
Regards,
Dennis JD Myr?n
Oslo Kodebureau
> Try setting the SMTP server prior to sending the mail.
>
[quoted text clipped - 24 lines]
>> End Sub
>> End Module
ES - 27 Oct 2004 21:03 GMT
Thanks for replying
Adding the line
SmtpMail.SmtpServer = "webmail.myservername.com"
results in an unhandled httpexception, "Could not access CDO.Message
object".
I use my original code in aspx web pages successfully, and I use cdonts with
asp classic pages successfully all the time. Any other thoughts? I'm
willing to try anything.
The point of this is to do some console apps to replace vbs scripts I use
for various things that don't have a UI...
Elton
> Sorry;
> System.Web.Mail.SmtpMail.SmtpServer = "www.yourserver.com";
[quoted text clipped - 29 lines]
>>> End Sub
>>> End Module
ES - 27 Oct 2004 21:13 GMT
Per your suggestion, I looked up that property in the help. Oops. The
local smtp server doesn't go there, the relay server does. I've got it
going on my local machine, relaying through exchange.
It's still not going anywhere on the web server, which doesn't use a relay
server though.
Elton
> Sorry;
> System.Web.Mail.SmtpMail.SmtpServer = "www.yourserver.com";
[quoted text clipped - 29 lines]
>>> End Sub
>>> End Module
ES - 27 Oct 2004 21:20 GMT
ARRRHGGGHH!!!!!
It also seems that it helps if your Exchange admin doesn't blow away your
alias!
It's working
Thanks
Elton (what's the emoticon for blushing?)
> Sorry;
> System.Web.Mail.SmtpMail.SmtpServer = "www.yourserver.com";
[quoted text clipped - 29 lines]
>>> End Sub
>>> End Module