• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 554
  • Last Modified:

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?

0
tjrobinson
Asked:
tjrobinson
  • 2
1 Solution
 
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
 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now