CDO 1.2.1 - Send Method (Message Object) problem, doesn't take parameters

I've referenced the Microsoft CDO 1.2.1 Library (COM) using C# and Visual Studio .NET 2003.

This part compiles:

CDO.Message myMail = new CDO.Message();
myMail.Subject="Sending email with CDO";
myMail.From="mymail@mydomain.com";
myMail.To="mymail@mydomain.com";

But this bit doesn't:

myMail.Send(true, true, 0);

Unless I change it to:

myMail.Send(); // i.e. no parameters

The MSDN documentation says it can take 3 parameters:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_olemsg_send_method_message.asp

The error is:

No overload for method 'Send' takes '3' arguments

What's going on?

tjrobinsonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

msdixonCommented:
there's a class in the .net framework for this. its usage is below:

         System.Web.Mail.MailMessage msg = new System.Web.Mail.MailMessage();
         msg.Subject = "Sending email with CDO";
         msg.From = "mymail@mydomain.com";
         msg.To = "mymail@mydomain.com";
         msg.Body = "This is a test";
         System.Web.Mail.SmtpMail.SmtpServer = "mail.domain.com";
         System.Web.Mail.SmtpMail.Send(msg);
0
Chester_M_RagelCommented:
I think its better to use MAPI33 or redemption to do the task. I also earlier used this one and then went to outlook redemption. It has good interface and easy access without any security prompt.

Now if I try to answer your question,
In the wrapper that you get from CDO (To  use in .NET) you don't get any Send method with parameters.

Chester
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tjrobinsonAuthor Commented:
Thanks. The reason I specifically want to use parameters is that I want to popup the mail composition window of the default mail client, in most cases Outlook 2000, with the subject, message and attachment already added. This is so the user can choose the recipient.

The System.Web.Mail class doesn't allow this and if Chester_M_Ragel is right, then it's not possible with CDO either.

I'll give Outlook Redemption a try:

http://www.dimastr.com/redemption/

Any maybe MAPI33 (doesn't look as professional though):

http://www.dimastr.com/redemption/

Any further ideas?
0
Chester_M_RagelCommented:
MAPI33(www.mapi33.freeservers.com) may be a good one. But it was not that easy to use. Here are some sample on that( g8.cx/mapi/ ). As I said it is very easy to if you go for redumption.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.