473,387 Members | 1,516 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,387 software developers and data experts.

Open Outlook new mail from ASP.net throws COM Exception.

My requirement is to preload the To,cc, Subject, body ,add an attachement and automatically open the New mail screen of outlook from my web page.

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
  1. Outlook.Application objOutlk = new Outlook.Application();        Outlook.MailItem mail = objOutlk.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;        
  2. mail.Subject = " Practice Dashboard";      
  3. mail.To = "srimathy.parthasarathy@hp.com"; 
  4. mail.Attachments.Add("c:\\sample.xls", Outlook.OlAttachmentType.olByValue, 1, "Practice Dashboard");       
  5. mail.Display(true);      
  6. objOutlk = null;  
  7. mail = null;
Oct 12 '07 #1
2 2353
Could anybody plz reply.
Oct 15 '07 #2
Shashi Sadasivan
1,435 Expert 1GB
Hello,
when you get such errors (and especially if you have been given an error code)
the best way is to search for it first.

Haver a look at this link on microsofts suppport

cheers
Oct 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ed Sutton | last post by:
How can I show the email client UI so the user can send the attachment to the desired recipient. I get an exception if I leave the MailMessage.To property blank. Is there any way to do this? I...
7
by: Matthew MacDonald | last post by:
Hi all, I'm trying to have an email message automatically generated when a button is clicked on an asp.net web form. I'm using portions of the sample code from...
6
by: Barkster | last post by:
I'm trying to send using outlook but I get an error on the directcast line if I don't have outlook open. Works fine if it is open. What do I need to do to be able to send without having outlook...
4
by: Pieter | last post by:
Hi, On the pc of one of my clients (W2000, Office 2003) I'm getting sometimes an exception when moving (Move) a MailItem to an Outlook-Folder: The RPC server is not available. (Exception from...
2
by: Pieter | last post by:
Hi, I'm using a thight integration with Outlook 2003 (with an Exchange server) in my VB.NET (2005) application. Until now I'm using the Outlook Object Model, but it appears to be very slow, and...
0
by: Slawomir Nasiadka | last post by:
Hi, I'am new to this group so I would like to say "Hello" everyone and here is my problem: I'm writing a simple application (code is at the end of this message) witch would list all mails...
0
by: jlconde | last post by:
I have a classe to send mails. It runs on yahoo well but with hotmail I never receive the mails.I do not receive an error neither. I would need some strange header to make the hotmail like my...
1
by: dittytwo | last post by:
hi there i have been tasked with automating a simple create email task using microsoft outlook. the code below works create unfortunately it works only at a system level i.e. the user does not see...
23
by: andyoye | last post by:
How can I launch Outlook on users machines when they click a button on a web form (InfoPath)? Thanks
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.