I'm trying to send emails with Outlook from my asp.net web app using Microsoft.Interop.Office.Outlook.
It takes some parameters like subject, cc, body and attachment from the app and then, sends them to Outlook .
Everything is working fine on a development environment (localhost), but once I send my app to the server it throws the following error :
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I read a bunch of articles regarding this same issue and I understand that in order for this to work I need to install Outlook on the server as well, but this is not what I need because then, the emails would be sent from the outlook's server account, as
it is also not recommended.
What would be the best choice here? Again, I want the mail to be sent from the client's email program.
I tried using server-side smtp, but this requires authentication of the sender. But I wouldnt want to restrict sending email from one user only.
Also, we tried using mailto: , which works extremely well, except only for the attachment part. I struggle too much and wasnt able to attach a file.
I know that there are many other options like jscript, exchange server, etc. but I really dont know much about them. If you could point me out to some examples, I would appreciate it so much.
heinserdiaz
Member
7 Points
21 Posts
Sending email with Outlook from server
May 07, 2012 06:20 PM|LINK
Hello everyone,
I'm trying to send emails with Outlook from my asp.net web app using Microsoft.Interop.Office.Outlook.
It takes some parameters like subject, cc, body and attachment from the app and then, sends them to Outlook .
Everything is working fine on a development environment (localhost), but once I send my app to the server it throws the following error :
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I read a bunch of articles regarding this same issue and I understand that in order for this to work I need to install Outlook on the server as well, but this is not what I need because then, the emails would be sent from the outlook's server account, as it is also not recommended.
What would be the best choice here? Again, I want the mail to be sent from the client's email program.
I tried using server-side smtp, but this requires authentication of the sender. But I wouldnt want to restrict sending email from one user only.
Also, we tried using mailto: , which works extremely well, except only for the attachment part. I struggle too much and wasnt able to attach a file.
I know that there are many other options like jscript, exchange server, etc. but I really dont know much about them. If you could point me out to some examples, I would appreciate it so much.
Sorry for my english.
TIA