www.pudn.com > EmailServer.zip > Settings_SmtpAgent.pas
unit Settings_SmtpAgent;
(******************************************************************************)
(* *)
(* Hermes Smtp Agent Settings Dialog Box *)
(* Part of Hermes SMTP/POP3 Server. *)
(* Copyright(C) 2000 by Alexander J. Fanti, All Rights Reserver Worldwide. *)
(* *)
(* Created January 17, 2000 by Alexander J. Fanti. See License.txt *)
(* *)
(* Used by: Main *)
(* Uses: DataU1 *)
(* *)
(* Description: This Modal dialog window allows the user to change the *)
(* Smtp Agent settings *)
(* *)
(* Revisions: 1/21/2000 AJF Commented *)
(* *)
(******************************************************************************)
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, Spin, ComCtrls;
type
TfrmSettings_SmtpAgent = class(TForm)
btnCancel: TBitBtn;
btnOK: TBitBtn;
PageControl1: TPageControl;
tsQueue: TTabSheet;
tsRetry: TTabSheet;
Label1: TLabel;
speInterval: TSpinEdit;
Label5: TLabel;
Label2: TLabel;
speRetry: TSpinEdit;
cbxBypassQueue: TCheckBox;
Label3: TLabel;
txtMasterSMTPServer: TEdit;
cbxForwardToMasterSMTPServer: TCheckBox;
speInactivityTimeout: TSpinEdit;
lblConnectionInactivityTimeout: TLabel;
procedure FormShow(Sender: TObject);
procedure btnOKClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmSettings_SmtpAgent: TfrmSettings_SmtpAgent;
implementation
uses DataU1;
{$R *.DFM}
procedure TfrmSettings_SmtpAgent.FormShow(Sender: TObject);
begin
PageControl1.ActivePage := tsQueue;
// Populate Dialog with Setting Information
speInterval.Value := (INI.Agent_PollingInterval div 60);
speRetry.Value := INI.Smtp_Retries;
cbxBypassQueue.Checked := INI.Agent_ServiceQueueImmediately;
cbxForwardToMasterSMTPServer.Checked := INI.Agent_ForwardToMasterSMTP;
txtMasterSMTPServer.Text := INI.Agent_MasterServerIPAddress;
speInactivityTimeout.Value := INI.Agent_InactivityTimeout;
end;
procedure TfrmSettings_SmtpAgent.btnOKClick(Sender: TObject);
begin
// Retrieve Settings from Dialog
INI.Agent_PollingInterval := (speInterval.Value * 60);
INI.Smtp_Retries := speRetry.Value;
INI.Agent_ServiceQueueImmediately := cbxBypassQueue.Checked;
INI.Agent_ForwardToMasterSMTP := cbxForwardToMasterSMTPServer.Checked;
INI.Agent_MasterServerIPAddress := txtMasterSMTPServer.Text;
INI.Agent_InactivityTimeout := speInactivityTimeout.Value;
end;
end.