how to implement "mail it" button or menuitem
-
I need to make the following (very common I think) thing: an edit box for the e-mail address and a button "create new mail" using entered address. The existing implementation of this function does not suit me because it's not working without properly setup e-mail client :( . The implementation is call to ShellExecute function with URL like "mailto:a@a.com..." I've examined winzip using regmon (by sysinternals, Mark Russinovich & Bryce Cogswell). It opens key HKLM\Software\Clients\Mail, takes default client name, opens its key right here and uses the specified dll :eek: Then "create new mail" window of the e-mail client opens. May be there's some one else knows how to do that??? konst
-
I need to make the following (very common I think) thing: an edit box for the e-mail address and a button "create new mail" using entered address. The existing implementation of this function does not suit me because it's not working without properly setup e-mail client :( . The implementation is call to ShellExecute function with URL like "mailto:a@a.com..." I've examined winzip using regmon (by sysinternals, Mark Russinovich & Bryce Cogswell). It opens key HKLM\Software\Clients\Mail, takes default client name, opens its key right here and uses the specified dll :eek: Then "create new mail" window of the e-mail client opens. May be there's some one else knows how to do that??? konst
The HKLM\Software\Clients\Mail registry key is used by MAPI - I think it's not necessary to read the settings and call DLL 'manually'. CDocument::OnFileSendMail creates a message with serialized document as an attachment and opens a default email client - have a look on this method. Tomasz Sowinski -- http://www.shooltz.com.pl