Open outlook new mail window from server c#

0

I having a frunctionality in which user can select multiple product links and can choose an option to mail those links to anyone as a new outlook mail window will be opened. Everything is working fine on my local machine but on deployed link this functionality is not working and is throwing below exception:

Exception Message : System.Runtime.InteropServices.COMException (0x80010001): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)).

I saw a couple of solutions for this like this and some code samples here but nothing helped me.
Also before going for the c# code for opening new mail window, i also tried doing it in javascript but got an issue there as well (here).

Please help !!

javascript
c#
email
outlook
asked on Stack Overflow Feb 18, 2016 by mailmehere • edited May 23, 2017 by Community

1 Answer

0

See sending mail through outlook is not done by server side it should be done in client Side..

To open a link in mail sending client you can do

<a href="mailto:someone@example.com?Subject=Hello%20again" target="_top">Send Mail</a>

This will automatically open mail sending client in user machine

answered on Stack Overflow Feb 18, 2016 by Anoop LL

User contributions licensed under CC BY-SA 3.0