Re:Obtaining Dial-Up, DSL or Network ISP Account Information
Hi John,
Try this (can't guarantee it will work on all platforms - but it's a
start):-
procedure TEmailOptions.FormActivate(Sender: TObject);
const
INet = '\Software\Microsoft\Internet Account Manager\';
var Reg: TRegistry;
AString: string;
begin
// We haven't got any email info, so attempt to get it
// from the registry
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey(INet, false)
then begin
AString := Reg.ReadString('Default Mail Account');
if Reg.OpenKey(INet+'Accounts\'+AString, false) then
begin
HostIdEdit.Text := Reg.ReadString('SMTP Server');
UserIdEdit.Text := Reg.ReadString('POP3 User Name');
EmailEdit.Text := Reg.ReadString('SMTP Email Address');
ReplyEdit.Text := Reg.ReadString('SMTP Email Address');
NameEdit.Text := Reg.ReadString('SMTP Display Name');
end;
end;
finally
Reg.CloseKey;
Reg.Free;
end;
end;
Regards
Kerin
Quote
"John Antoniewicz" <j...@{*word*104}cove.com> wrote in message
news:3d423ca6$1_1@dnews...
Quote
> Hello,
> I would like to know how I would go about reading the primary (default)
> SMTP, POP3 and other E-Mail account information which I can use as the
SMTP,
> POP3 information within an SMTP, POP3 component.
> I am using an E-Mail component from LMD and AHM. I want to make the
> definition as seamless as possible for the end-user. For example if the
> user's ISP is Bellsouth then the SMTP value is lig.mail.bellsouth.net and
> the POP3 value is lig.mail.bellsouth.net. This is what I need to read
along
> with the dial-up account ID and dial-up password.
> Thank you,
> John A