Hi Klaus,
Well, with your help and others I've pretty much figured it out.
It was a rights issue and a bad smtp server. By 'bad' I mean one that does
not allow relay, and although I don't know why it failed on cdo, it did.
When I changed to 127.0.0.1 (localhost) it worked fine from the command line
(it's a vb .net console app) or via xp_cmdshell inside sql server. The
server has ms exchange installed so it's its own smtp server. This is fine,
as the job is part of an agent job on sql server and it does what it has to
do with no problems (its sending me an attachment log file after it runs).
However, when you try to run from the command line of a pc connected to the
server, the cdo error recurs. Now I think this is because cdosys.dll does
not recognize the user's identity. What do I have to do in the code to
authorize the user so that cdo will allow it to be run from the pc instead
of the server?
Tx for all your help - the above question is somewhat important, though,
because I do not want to have to run an sp script every time I really want
to send mail through vb .net.
Bernie Yaeger