I am developing WPF application. I need to open default mail client in compose mode with filled basic details like to,bcc,cc,body and attachment.
Code works good when default mail client is selected.But When i remove default mail client(from default programs in control panel) the code gives.
MAPI mapi = new MAPI(); /// Mapi default class to add property in email
mapi.SendMailPopup("testing", "body text");
I tried to google and found that "Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail", "", "none")" gives default mail client name. I always get "NONE" as result in all case whether
default mail client set or not.
I am using "MAPISendMail" method from "MAPI32.DLL" for execution
I suggest you check the default value below HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail in register entry.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to
MSDN Support, feel free to contact MSDNFSF@microsoft.com.