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



***********************************************************************
NOTICE: This e-mail transmission, and any documents, files or previous
e-mail messages attached to it, may contain confidential or privileged
information. If you are not the intended recipient, or a person
responsible for delivering it to the intended recipient, you are
hereby notified that any disclosure, copying, distribution or use of
any of the information contained in or attached to this message is
STRICTLY PROHIBITED. If you have received this transmission in error,
please immediately notify the sender and delete the e-mail and attached
documents. Thank you.
***********************************************************************
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk

Reply via email to