tjrobinson
asked on
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@mydoma in.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?
This part compiles:
CDO.Message myMail = new CDO.Message();
myMail.Subject="Sending email with CDO";
myMail.From="mymail@mydoma
myMail.To="mymail@mydomain
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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?
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.
System.Web.Mail.MailMessag
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.S
System.Web.Mail.SmtpMail.S