Send option is left to the user. I was able to find the code for this and it executed successfully in the LocalHost...
I'm using Windows XP, Outlook 2003 and ASP.net 2.0
But when i deploy it in the server, it get a following error message
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005.
I seached for some tips in the internet and got the link which is posted soem time in 2005.
http://groups.google.com/groups?hl=...gp04%26rnum%3D4
The suggestion in this doesn't help.
Kindly let me know if there is any thing else that i need to do to resolve this..
I have pasted the code that i'm using.
Expand|Select|Wrap|Line Numbers
- Outlook.Application objOutlk = new Outlook.Application(); Outlook.MailItem mail = objOutlk.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;
- mail.Subject = " Practice Dashboard";
- mail.To = "srimathy.parthasarathy@hp.com";
- mail.Attachments.Add("c:\\sample.xls", Outlook.OlAttachmentType.olByValue, 1, "Practice Dashboard");
- mail.Display(true);
- objOutlk = null;
- mail = null;