Rob - That's the SMTP mail server, not the default mail client. Try this key instead: HKEY_CLASSES_ROOT\mailto\shell\open\command\Default
m Date: Mon, 19 Jan 2009 08:12:00 +0000 From: [email protected] Subject: Re: Detecting a Default EMail Client To: Delphi-Talk Discussion List <[email protected]> Message-ID: <of066e7c4f.0c81c3ad-on80257543.002cece0-80257543.002d3...@yara.com> Content-Type: text/plain; charset="UTF-8" Try this I wrote it some years ago then we moved to Notes function GetEmailAddress : String; var registry: TRegistry; begin registry := TRegistry.Create; try try registry.RootKey := HKEY_CURRENT_USER; {False because we do not want to create it if it doesn?t exist} registry.OpenKey('Software\Microsoft\Internet Account Manager\Accounts\00000001', false); Result := registry.ReadString('SMTP Email Address'); except Result := ''; end; finally registry.Free; end; {Try Finally} end; "Alan Colburn" <[email protected]> Sent by: [email protected] 17/01/2009 01:06 Please respond to Delphi-Talk Discussion List <[email protected]> To "Delphi-Talk Discussion List" <[email protected]> cc Subject Detecting a Default EMail Client I'm looking for code that would detect whether or not a user has assigned a default email client. I have methods that send email using the default program, and if the user has not assigned a default client then an error is created. (You often need to re-establish your default email program after a Windows update.) Any suggestions? ... As always, thanks for your help -- Al C. __________________________________________________ Delphi-Talk mailing list -> [email protected] http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk
