Web.Mail Problems

  • Thread starter Thread starter DanB
  • Start date Start date
D

DanB

When I try to send email using the System.Web.Mail namespace

I get an exception of

Could not Create CDO.message object.

FYI - I worked for a long time with a similar exception of
"Could not create CDO.message object". I think I resolved that by
registering CDO.dll.
I am running VB.NET 2002, Framework 1.0 (Even though I have installed
Framework 1.1 - it still says I am running 1.0 when I pull up the IDE about
box)

This is the code attached to a button

Dim mMail As SmtpMail

'mMail.SmtpServer = "smtp-server.kc.rr.com"

mMail.SmtpServer = "localhost"

'mMail.SmtpServer = "127.0.0.1"

Try

mMail.Send("(e-mail address removed)", "(e-mail address removed)", "Test", "Test body")

Catch ex As Exception

MsgBox("The following exception occurred: " + ex.ToString())

'check the InnerException

While Not (ex.InnerException Is Nothing)

MsgBox("The following InnerException reported: " +
ex.InnerException.ToString())

ex = ex.InnerException

End While

End Try


Anybody know my next step
 
Hi Dan,

You have 2 problems: my about box shows clearly vs .net 2003 and framework
1.1. Don't know what you did wrong, but you might want to reinstall 1.1 and
or vs into another drivespec.

CDO again - it drives me crazy, and frankly MS has to work on this, as it
can happen for too many reasons. I had a similar cdo problem and solved it
by googling it. On Google there are dozens of articles that can be found on
different possible reasons for this error.

HTH,

Bernie Yaeger
 
Thanks for the info Bernie.

Even though I run VB.Net 2002 do you know should Visual Studio be 2003?

I have just re-installed framework 1.1 and that did not fix it. I thought I
read somewhere that you could have both 1.0 and 1.1 installed but you must
tell VB (or is it VS) which one to load. I don't know how to do that if
that is the case.

Do you think this has anything to do with the Web.Mail problem? Because I
have googled this and I have found some of the information helpful. But
nothing on point for this problem of the "Could not create CDO.message".
 
Hi Dan,

Just a thought - is IIS configured and active on your pc?

Bernie
PS - re vs .net - I have 2002 and 2003 installed; I don't recall having to
do anything other than select the appropriate .exe when opening either one.
I can still open 2002 whenever I want (but I now never do).
 
DanB,
"Could not create CDO.message object".
"Create" or "Access"?
I think I resolved that by registering CDO.dll.
CDO.DLL has nothing to do with the System.Web.Mail namespace.
System.Web.Mail will use either CDONTS or CDOSYS depending on the OS
version:
http://www.systemwebmail.net/faq/1.5.aspx

FWIW: CDO.DLL is part of Microsoft Outlook & Exchange Server.


It sounds like you don't have CDONTS or CDOSYS installed on your computer.
As I stated CDONTS & CDOSYS are OS dependant.

The following site provides a wealth of information on System.Web.Mail.

http://www.systemwebmail.net/

Topic 4.2.3 starts discussing your message.
http://www.systemwebmail.net/faq/4.2.3.aspx
I am running VB.NET 2002, Framework 1.0 (Even though I have installed
Framework 1.1 - it still says I am running 1.0 when I pull up the IDE
about box)
VB.NET 2002 is hared coded to .NET 1.0, if you want to upgrade to .NET 1.1
you need to install VB.NET 2003.

Hope this helps
Jay
 
I am running VB.NET 2002, Framework 1.0 (Even though I have installed
Framework 1.1 - it still says I am running 1.0 when I pull up the IDE
about box)

The IDE about box? As in the VB.NET about box? Version 2002 only supports
framework 1.0, 2003 supports framework 1.1. If you want to compile
assemblies for 1.1 of the framework you will need to upgrade or use
SharpDevelop :-(

Nick.
 
Okay,

I think I can forget the framework 1.1 issue as the cause.

Yes I have IIS configured and running

I think CDOsys.dll is not registered correctly. But it won't unregister
by doing the regsvr32 /u command.

Maybe I am all wet here.

Dan
 
Hi there,

It seems like there is so much confusion on this CDO thing, I personally
managed to get it working by installed the CDO objects from the Microsoft
Office XP CD, maybe that is weird, but it worked for me, unless of course
all it done was to re-register the DLL that you are having troubles with.

Do you have Office installed at all? Maybe this can cause an issue, I'm
no expert in this matter, just having some guesses.

Nick.
 
Hello,

Nope no office on this other than Frontpage.

I have decided to give up on CDO and go with a product from a 3rd party.

Thanks to everyone for the ideas and help.

Dan
 
LOL, that's how most people get past this problem. Good luck with finding a
good 3rd party solution, if you find a nice free open source one written in
VB.NET let me know! :-)

Nick.
 
Hi Dan,

Before you give up, review what Jay Harlowe said - I think he is on the
right track re cdonts v. cdo.dll.

Bernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top