Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


How to change Netscape preferences from your program (and access multiple email accou


Reply
Views: 1162  
Thread Tools Rate Thread
  #1  
Old 08-11-2010, 02:21 PM
bholas bholas is offline
Award Winner
 
Join Date: Apr 2010
Posts: 4,977
Default How to change Netscape preferences from your program (and access multiple email accou

If you've been wondering how to change Navigator 3.x's preferences (or settings) from your program, take a look at the following function:
procedure SetNetscapeMailPreferences(
sUserName,
sMailboxName,
sFromAddress,
sReplyToAddress,
sOrganization,
sSignatureFile,
sSMTPServer,
sPOPServer
: string );
var
r : TRegIniFile;

procedure Save( a, b, c : string );
begin
r.WriteString( a, b, c + #0 );
end;

begin
r := TRegIniFile.Create(
'Software'
+ 'NetscapeNetscape Navigator'
);

Save( 'Mail', 'POP Name',
sMailboxName );

Save( 'Services', 'POP_Server',
sPOPServer );

Save( 'Services', 'SMTP_Server',
sSMTPServer );

Save( 'User', 'User_Addr',
sFromAddress );

Save( 'User', 'User_Name',
sUserName );

Save( 'User', 'Reply_To',
sReplyToAddress );

Save( 'User', 'User_Organization',
sOrganization );

Save( 'User', 'Sig_File',
sSignatureFile );

r.Free;
end;
As you can see, Netscape's using the following registry key to store its user settings:
HKEY_CURRENT_USER
Software
Netscape
Netscape Navigator
To get a list of other settings you can change, simply run "Registry Editor" ("RegEdit.exe") and select the above registry key.
Our example function "SetNetscapeMailPreferences()" will let you change your Netscape's mail preferences, which means you can utilize it to write a program that would let users access multiple email accounts using a single installation of Navigator 3.x. Here's a sample call:
SetNetscapeMailPreferences(
'Bob B Bob',
'bob',
'bob@bob.com',
'bob@bob.com',
'Bob Inc.',
'C:Sign.TXT',
'bob.com',
'bob.com'
);
NOTE:Netscape should be closed while making modifications to its registry entires. Also don't forget that future versions of Netscape may use different registry keys.

Reply With Quote
Reply

Tags
programming tips

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)