Following up on my post about sending email with MS Outlook, a reader asks, "I wonder how one can mine out the chosen default mail client... Is that somewhere in the Registry?"
It does indeed appear to be in the Windows Registry, and can therefore be extracted using the win32/registry library. I've just started hacking around with this library, but this bit of code seems to do the trick...
Win32::Registry::HKEY_LOCAL_MACHINE.open('Software\Clients\Mail') do |reg|
reg_typ, reg_val = reg.read('')
mail_client = get_mail_client
...though I am sure it can be improved upon.
On my machine, this returns 'Microsoft Outlook'.
Well, there you have it. As always, post comments or send email with enhancements, questions, or suggestions for future topics.
Thanks for stopping by!