Fórum Obtendo as Configurações do Outlook Express #275549
04/04/2005
0
Como e se é possivel conseguir listar as configurações do Outlook Express pelo delphi?
Listar:
- As Contas
- Os POP3´s
- Os SMTP´s
- etc
Desde já,
Obrigado
Bruno Rodrigues
Listar:
- As Contas
- Os POP3´s
- Os SMTP´s
- etc
Desde já,
Obrigado
Bruno Rodrigues
Bfbraz
Curtir tópico
+ 0
Responder
Posts
05/04/2005
Anfm
Vc terá que ler essas informações do registro do windows.
O exemplo abaixo lê os servidores SMTP cadastrados no outlook. Testei apenas no 98, talvez no XP as chaves sejam diferentes.
with TRegistry.create do try
RootKey := HKEY_USERS;
if OpenKeyReadOnly(´.DEFAULT\Software\Microsoft\Internet Account Manager\Accounts\´) then
GetKeyNames(Chaves) ;
CloseKey ;
For I := 0 to Chaves.Count -1 do begin
if OpenKeyReadOnly(´.DEFAULT\Software\Microsoft\Internet Account Manager\Accounts\´+Chaves[I]) then
if ValueExists(´SMTP Server´) then begin
cbSMTP.Items.Add(ReadString(´SMTP Server´));
cbEmailRemetente.Items.Add(ReadString(´SMTP Email Address´));
end ;
CloseKey;
end ;
finally
Chaves.Free ;
Free
end ;
O exemplo abaixo lê os servidores SMTP cadastrados no outlook. Testei apenas no 98, talvez no XP as chaves sejam diferentes.
with TRegistry.create do try
RootKey := HKEY_USERS;
if OpenKeyReadOnly(´.DEFAULT\Software\Microsoft\Internet Account Manager\Accounts\´) then
GetKeyNames(Chaves) ;
CloseKey ;
For I := 0 to Chaves.Count -1 do begin
if OpenKeyReadOnly(´.DEFAULT\Software\Microsoft\Internet Account Manager\Accounts\´+Chaves[I]) then
if ValueExists(´SMTP Server´) then begin
cbSMTP.Items.Add(ReadString(´SMTP Server´));
cbEmailRemetente.Items.Add(ReadString(´SMTP Email Address´));
end ;
CloseKey;
end ;
finally
Chaves.Free ;
Free
end ;
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)