473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

System.Web.Mail question

What does this error mean?

Could not access CDO Message Object.

Many thanks.
Nov 16 '05 #1
20 2984
Make sure the SMTP service is running on the machine your using to send
mail. This is a good link for troubleshooting Mail related issues.

http://www.systemwebmail.com/faq/4.aspx

Nov 16 '05 #2
Adrian <xx*@xxx.xx> wrote:
What does this error mean?

Could not access CDO Message Object.


If you search for the error message on Google, you'll find *lots* of
references to it. I believe the InnerException property usually gives
you a lot more information about what's gone wrong.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3
"Adrian" <xx*@xxx.xx> wrote in news:a5**************************@freeler.nl:
What does this error mean?

Could not access CDO Message Object.


CDO simply isnt installed on many systems... You can try this:
http://www.codeproject.com/csharp/IndySMTP.asp
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/
Nov 16 '05 #4
"Chad Z. Hower aka Kudzu" <cp**@hower.org> wrote in message
news:Xn******************@127.0.0.1...
"Adrian" <xx*@xxx.xx> wrote in

news:a5**************************@freeler.nl:
What does this error mean?

Could not access CDO Message Object.


CDO simply isnt installed on many systems... You can try this:
http://www.codeproject.com/csharp/IndySMTP.asp
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
http://www.atozed.com/IntraWeb/


Yes I know about Indy. The trouble is the license. It cannot be
redistributed.
Nov 16 '05 #5
<su************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Make sure the SMTP service is running on the machine your using to send
mail. This is a good link for troubleshooting Mail related issues.

http://www.systemwebmail.com/faq/4.aspx

What do you mean by running - that the pc is connected to the server?
Nov 16 '05 #6
Adrian,
From Windows 2000 server to 2003 server, the default component for

sending local smtp mail changed from the CDONTS COM+ package to the CDO
package. If you have a late version of outlook installed, you'll
probably have the CDO package installed. You can either make a com
interop assembly to use CDONTS or install the CDO package on the
server. System.Web.Mail uses CDO.

Best regards,
Jeffrey Palermo

Nov 16 '05 #7
"Jeffrey Palermo, MCAD.Net" <je************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Adrian,
From Windows 2000 server to 2003 server, the default component for

sending local smtp mail changed from the CDONTS COM+ package to the CDO
package. If you have a late version of outlook installed, you'll
probably have the CDO package installed. You can either make a com
interop assembly to use CDONTS or install the CDO package on the
server. System.Web.Mail uses CDO.

Best regards,
Jeffrey Palermo


"You can either make a com interop assembly to
use CDONTS" ... wouldn't know how the L to do that.
The only thing I can find on my pc is pkmcdo.dll
Is a cdo package downloadable? Couldn't find a
download option on MSDN.

Apologies for the ignorance.
Nov 16 '05 #8
"Jeffrey Palermo, MCAD.Net" <je************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Adrian,
From Windows 2000 server to 2003 server, the default component for

sending local smtp mail changed from the CDONTS COM+ package to the CDO
package. If you have a late version of outlook installed, you'll
probably have the CDO package installed. You can either make a com
interop assembly to use CDONTS or install the CDO package on the
server. System.Web.Mail uses CDO.

Best regards,
Jeffrey Palermo


Hi Jeffrey

After a connection with the server has been established, an email can be
sent ok.
However if a connection has not yet been established, I get the "Could not
access
CDO.Message object" error. Is there a way to overcome this, i.e., that a
message
can be sent without first having to manually establish a connection with the
server?

Many thanks,
Adrian
Nov 16 '05 #9
"Adrian" <xx*@xxx.xx> wrote in news:91***************************@freeler.nl:
Yes I know about Indy. The trouble is the license. It cannot be
redistributed.


You dont understand the license very well if you think it cannot be
redistributed. Where did you get this impression? In fact Indy has two
licenses you can choose from, both of which allow free redistribution.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Make your ASP.NET applications run faster
http://www.atozed.com/IntraWeb/
Nov 16 '05 #10
"Chad Z. Hower aka Kudzu" <cp**@hower.org> wrote in message
news:Xn******************@127.0.0.1...
"Adrian" <xx*@xxx.xx> wrote in

news:91***************************@freeler.nl:
Yes I know about Indy. The trouble is the license. It cannot be
redistributed.


You dont understand the license very well if you think it cannot be
redistributed. Where did you get this impression? In fact Indy has two
licenses you can choose from, both of which allow free redistribution.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Make your ASP.NET applications run faster
http://www.atozed.com/IntraWeb/


Hi Chad,

If I have FreeSMTP.Net.dll and
Indy.Sockets.dll in an application
I am not allowed to sell that application
commercially. That is what I understand.
If that is not so, could you please direct me
to where I can read anything to the
contrary?

Many thanks.
Nov 16 '05 #11
Adrian <xx*@xxx.xx> wrote:
If I have FreeSMTP.Net.dll and
Indy.Sockets.dll in an application
I am not allowed to sell that application
commercially. That is what I understand.
If that is not so, could you please direct me
to where I can read anything to the
contrary?


http://www.indyproject.org/License/BSD.iwp talks about one form of the
Indy licence which doesn't seem to stop you from selling it
commercially.

The FreeSMTP.Net library appears to only be freely distributable for
non-profit applications, but I don't see what that has to do with your
claim that Indy can't be redistributed.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #12

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Adrian <xx*@xxx.xx> wrote:
If I have FreeSMTP.Net.dll and
Indy.Sockets.dll in an application
I am not allowed to sell that application
commercially. That is what I understand.
If that is not so, could you please direct me
to where I can read anything to the
contrary?


http://www.indyproject.org/License/BSD.iwp talks about one form of the
Indy licence which doesn't seem to stop you from selling it
commercially.

The FreeSMTP.Net library appears to only be freely distributable for
non-profit applications, but I don't see what that has to do with your
claim that Indy can't be redistributed.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Hi John,

Thank very much you for this information.
I will now have to find out whether Indy can work
together with System.Web.Mail. As you will
understand I am not familiar with this area
of expertise. Any further tips would be greatly
appreciated.

Adrian.
Nov 16 '05 #13
Adrian <xx*@xxx.xx> wrote:
Thank very much you for this information.
I will now have to find out whether Indy can work
together with System.Web.Mail. As you will
understand I am not familiar with this area
of expertise. Any further tips would be greatly
appreciated.


Using Indy means you don't have to use System.Web.Mail at all - why
would you particularly want to?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #14

"Adrian" <xx*@xxx.xx> wrote in message
news:a0***************************@freeler.nl...

Hi John,

Thank very much you for this information.
I will now have to find out whether Indy can work
together with System.Web.Mail. As you will
understand I am not familiar with this area
of expertise. Any further tips would be greatly
appreciated.

Adrian.


John,

I seem to have found something here:

http://www.codeproject.com/csharp/IndySMTP.asp
Nov 16 '05 #15

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Adrian <xx*@xxx.xx> wrote:
Thank very much you for this information.
I will now have to find out whether Indy can work
together with System.Web.Mail. As you will
understand I am not familiar with this area
of expertise. Any further tips would be greatly
appreciated.


Using Indy means you don't have to use System.Web.Mail at all - why
would you particularly want to?


Actually I don't particularly want to. As I posted back to you
http://www.codeproject.com/csharp/IndySMTP.asp
seems to have the information I have been looking for.
(Hopefully it does.)

Many thanks Jon, your response about
the license seems to have got me going in
the right direction. I was starting to think
this subject was a "mer à boire".
Nov 16 '05 #16
Pointless Interop is not something I'd encourage. Do you really need to call
the Indy components? There is native dotnet SMTP support and if that's not
enough the superb socket classes make it trivial to implement a simple
protocol like SMTP. Consider this article of mine
http://www.codeproject.com/useritems/EmailMessage.asp

Does it do attachments? Yes and no. It certainly does multipart mime
encoding but it doesn't support attachments in the sense in which most users
would conceive them. Once again this would be trivial to implement - I just
didn't see the point. EmailMessage class is designed to send a web page as
the content of the message. If you want attachments just put in hyperlinks
to the files on a webserver. It means people don't have to collect the
attachments unless they really want them.
Nov 16 '05 #17
Peter Wone <pe****@wamoz.com> wrote:
Pointless Interop is not something I'd encourage. Do you really need
to call the Indy components? There is native dotnet SMTP support and
if that's not enough the superb socket classes make it trivial to
implement a simple protocol like SMTP.
But why implement it yourself when someone else has already done it?
(As for it being trivial - in your article you make mention of an
earlier version of your class having no error checking etc. Such things
take time in my experience, but are vital for production systems.)
Consider this article of mine
http://www.codeproject.com/useritems/EmailMessage.asp

Does it do attachments? Yes and no. It certainly does multipart mime
encoding but it doesn't support attachments in the sense in which most users
would conceive them. Once again this would be trivial to implement - I just
didn't see the point. EmailMessage class is designed to send a web page as
the content of the message. If you want attachments just put in hyperlinks
to the files on a webserver. It means people don't have to collect the
attachments unless they really want them.


And I'm sure that's good for many uses, but not all of them. I don't
see why you think it's actually a bad idea to use Indy.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #18
> But why implement it yourself when someone else has already done it?

Whether someone else has done "it" depends on your precise definition of
"it" hence I regard the DNF classes mail support adequate for plaintext and
inadequate for fancy work with ASPX etc.

Also sometimes "someone else" hasn't done a proper job. MimeOLE fails to
include watermark graphics referenced by a linked stylesheet. MimeOLE also
leaves stylesheets linked instead of munging them into the HTML which means
they get lost with Outlook Web Access.
(As for it being trivial - in your article you make mention of an
earlier version of your class having no error checking etc. Such things
take time in my experience, but are vital for production systems.)
Yes indeed. My sysadmin asked me to use the pickup folder, apparently it's
faster due to something to do with queueing and how our systems are
configured. The SMTP protocol implementations are there for illustrative
purposes. In my environment this code worked first time which is a big part
of the reason the code never got much in the way of instrumentation. I stand
by my assertion that it is trivial. If you want to criticise me then say
that I am lazy.

Then add "pragmatic" - in a production system the pickup folder is more
likely.
And I'm sure that's good for many uses, but not all of them. I don't
see why you think it's actually a bad idea to use Indy.


I don't think it's a bad idea to use Indy - from Delphi. I just think that
if I can write a fancy mailer in 300 lines of pure managed code - and I
did - then it's wrong to write 600 lines of interop.

Regarding attachments, my position on them is that machine generated email
is dangerously close to spam before you even start, and that there's enough
crap in my mailserver queue without me encouraging the irresponsible. The
best reason I can conceive for wanting to attach a file to a machine
generated email would be sending an invoice or similar business document.
However in this situation the document can directly be the body of the
email, leaving me with no ethically acceptable reason for supporting
attachments in machine generated email.
Nov 16 '05 #19
Peter Wone <pe****@wamoz.com> wrote:

<snip to get to the heart of the matter>
And I'm sure that's good for many uses, but not all of them. I don't
see why you think it's actually a bad idea to use Indy.


I don't think it's a bad idea to use Indy - from Delphi. I just think that
if I can write a fancy mailer in 300 lines of pure managed code - and I
did - then it's wrong to write 600 lines of interop.


I think you're confused about Indy. These days, Indy is available as a
..NET assembly. No interop involved. Delphi is another .NET language
now.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #20
Just leave server blank if using CDONTS:

Sub Button1_Click(sender As Object, e As EventArgs)
Try
' Build a MailMessage
Dim mailMessage As System.Web.Mail.MailMessage = New
System.Web.Mail.MailMessage
mailMessage.From = TextBox2.Text
mailMessage.To = TextBox1.Text
mailMessage.Subject = TextBox3.Text
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text
mailMessage.Body = TextBox4.Text

System.Web.Mail.SmtpMail.SmtpServer = ""
System.Web.Mail.SmtpMail.Send(mailMessage)

Label2.Text = "Your Mail was sent."
Catch exp as Exception
Label2.Text = "There was and error Sending the mail: " &
exp.Message
End Try
End Sub
Windows Win2k, Win XP Pro and Win2003 users - CDOSYS comes installed on
Windows 2000, Windows XP Pro, and Windows 2003.

Windows NT4 and Win2k users - IIS 4 and 5 on NT4 and Win2k installs the
CDONTS email component by default, but you need the SMTP server that
comes with IIS installed on the web server as well (This is the email
component that most web hosts will use).

Windows 9x users - I'm afraid Windows 98 does not support the CDOSYS or
CDONTS email components so... good luck.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #21

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Valiz | last post by:
Hi, I am updating system time with IRIG time source which sends irregular pulses as shown below 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not present) I need to update...
3
by: chuckdfoster | last post by:
When using this bit of code, it sends two emails most of the time. Sometimes it doesn't send two, but most of the time it does. I put the system time (Now) in the Subject and each email has a...
8
by: Ajit | last post by:
Is there anyway to move attachments from a incoming email into a specified folder using System.Web.Mail ? has anyone done this ? Any help is appreciated.
4
by: rroman | last post by:
I've referenced System.Web.Dll in my project and running Imports System.Web.Mail in AssemblyInfo.vb but MailMessage and SmtpMail are still "undefined".
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
0
by: howardr101 | last post by:
Hi, Have hunted around on the groups and can't find anything, hence. I've tried this against 2 mail servers (mailtraq and hmailserver) and it occus with both. The problems seems to be that...
6
by: Anthony P. | last post by:
Hello Everyone, I'm attempting to create a new MailMessage object by following a tutorial and I can't seem to get it right according to VS 2008. I'm hoping someone here can help me find out what...
3
by: Ben | last post by:
Hi, I'm new to VB.Net programming, and am trying to learn VB using the new Visual Studeio 2008 Express Edition. I've decided just to jump straight in and try to program a simple mail form with 3...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.