Use of SmtpMail to Send Mail Outside Domain

Use of SmtpMail to Send Mail Outside Domain

Post by Leonar » Thu, 21 Aug 2003 07:26:34

I am using SmtpMail on a couple of ASP.NET pages. When
mail is sent to an address outside the domain I get
the "Could not access 'CDO.Message' object." error
message. I have looked in the newsgroup and I see several
entries on this but none that seem to work in my situation.

Exchange 2000 is running on same machine as the Web server
which is also a domain controller. I see a discussion of
several things such as using impersonation to setting
permissions on cdosys.dll to allow access by
IWAM_MACHINE. There seems to so many approaches, some of
which, I have tried without succes.

I am trying to simply send email to persons outside my
domain from a Web page. Does anyone have any
straightforward, unambiguous steps I can take to be able
to achieve this without unduly compromising security on
the machine?


Use of SmtpMail to Send Mail Outside Domain

Post by Kevin Spen » Thu, 21 Aug 2003 21:02:51

It sounds like a Relaying issue. You should be able to tweak the Relay
permissions on the SMTP server to fix it.


Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.


Use of SmtpMail to Send Mail Outside Domain

Post by Leonar » Thu, 21 Aug 2003 21:35:57

Thanks. I am not clear on what relaying settings to
apply. I am running Windows 2000 Server SP3 with Exchange
2000. The relay settings only allow forwarding from
another machine on my LAN. What other settings should I
be making. The machine in question is an active directory
domain controller. I have been dealing with this for
almost two weeks and nothing seems to work when sending
mail outside the domain. I notice another posting today
on the same issue. It seems a lot of people are having
the same problem and I'm seeing a lot of different,
conflicting, and confusing approaches to solutions that
don't seem to work. I guess we need some really clear,
complete, start-to-finish guidance on this.

What settings should we make regarding relaying in
Exchange? What permissions should we set for the
IWAM_MACHINE or ASPNET accounts? What kind of permissions
should be set for the cdosys.dll? What impersonations
should be set?

I have seen posting in all these areas from various points
of view. Some I understand and have tried without success
and some I don't. Since this seems to be a problem that
many of us are having, some kind of comprehensive,
coherent help is needed on how to the SmtpMail object in
various scenarios and configurations would be quite

Thanks, again.
tweak the Relay