Skip to content
Snippets Groups Projects
Commit a71d6c39 authored by rswindell's avatar rswindell
Browse files

Created SendMail TabSheet and moved all SendMail-related controls there.

Added new SendMail Relay Server Port edit box.
Moved Sound edit boxes back to their appropriate TabSheets.
Minor cosmetic changes to labels and hints.
parent 542880d6
No related branches found
No related tags found
No related merge requests found
......@@ -91,11 +91,12 @@ void __fastcall TMailCfgDlg::FormShow(TObject *Sender)
AutoStartCheckBox->Checked=MainForm->MailAutoStart;
LogFileCheckBox->Checked=MainForm->MailLogFile;
HostnameCheckBox->Checked
=!(MainForm->ftp_startup.options&FTP_OPT_NO_HOST_LOOKUP);
=!(MainForm->mail_startup.options&MAIL_OPT_NO_HOST_LOOKUP);
SMTPServerEdit->Text=AnsiString(MainForm->mail_startup.relay_server);
RelayServerEdit->Text=AnsiString(MainForm->mail_startup.relay_server);
SMTPPortEdit->Text=AnsiString(MainForm->mail_startup.smtp_port);
POP3PortEdit->Text=AnsiString(MainForm->mail_startup.pop3_port);
RelayPortEdit->Text=AnsiString(MainForm->mail_startup.relay_port);
DNSServerEdit->Text=AnsiString(MainForm->mail_startup.dns_server);
InboundSoundEdit->Text=AnsiString(MainForm->mail_startup.inbound_sound);
OutboundSoundEdit->Text=AnsiString(MainForm->mail_startup.outbound_sound);
......@@ -124,9 +125,7 @@ void __fastcall TMailCfgDlg::FormShow(TObject *Sender)
TcpDnsCheckBox->Checked=MainForm->mail_startup.options
&MAIL_OPT_USE_TCP_DNS;
SMTPServerEdit->Enabled=RelayRadioButton->Checked;
DNSServerEdit->Enabled=!RelayRadioButton->Checked;
TcpDnsCheckBox->Enabled=!RelayRadioButton->Checked;
DNSRadioButtonClick(Sender);
POP3EnabledCheckBoxClick(Sender);
PageControl->ActivePage=GeneralTabSheet;
}
......@@ -158,6 +157,7 @@ void __fastcall TMailCfgDlg::OKBtnClick(TObject *Sender)
MainForm->mail_startup.smtp_port=SMTPPortEdit->Text.ToIntDef(25);
MainForm->mail_startup.pop3_port=POP3PortEdit->Text.ToIntDef(110);
MainForm->mail_startup.relay_port=RelayPortEdit->Text.ToIntDef(25);
MainForm->mail_startup.max_clients=MaxClientsEdit->Text.ToIntDef(10);
MainForm->mail_startup.max_inactivity=MaxInactivityEdit->Text.ToIntDef(120);
MainForm->mail_startup.max_delivery_attempts
......@@ -169,7 +169,7 @@ void __fastcall TMailCfgDlg::OKBtnClick(TObject *Sender)
,DNSServerEdit->Text.c_str());
sprintf(MainForm->mail_startup.relay_server,"%.*s"
,sizeof(MainForm->mail_startup.relay_server)-1
,SMTPServerEdit->Text.c_str());
,RelayServerEdit->Text.c_str());
sprintf(MainForm->mail_startup.inbound_sound,"%.*s"
,sizeof(MainForm->mail_startup.inbound_sound)-1
,InboundSoundEdit->Text.c_str());
......@@ -245,7 +245,9 @@ void __fastcall TMailCfgDlg::POP3SoundButtonClick(TObject *Sender)
void __fastcall TMailCfgDlg::DNSRadioButtonClick(TObject *Sender)
{
SMTPServerEdit->Enabled=RelayRadioButton->Checked;
RelayServerEdit->Enabled=RelayRadioButton->Checked;
RelayPortEdit->Enabled=RelayRadioButton->Checked;
RelayPortLabel->Enabled=RelayRadioButton->Checked;
DNSServerEdit->Enabled=!RelayRadioButton->Checked;
TcpDnsCheckBox->Enabled=!RelayRadioButton->Checked;
}
......
......@@ -50,13 +50,13 @@ object MailCfgDlg: TMailCfgDlg
Top = 3
Width = 278
Height = 199
ActivePage = SMTPTabSheet
ActivePage = GeneralTabSheet
TabOrder = 3
object GeneralTabSheet: TTabSheet
Caption = 'General'
object InterfaceLabel: TLabel
Left = 7
Top = 37
Top = 36
Width = 85
Height = 20
AutoSize = False
......@@ -66,7 +66,7 @@ object MailCfgDlg: TMailCfgDlg
end
object MaxClientsLabel: TLabel
Left = 7
Top = 63
Top = 62
Width = 85
Height = 20
AutoSize = False
......@@ -74,36 +74,18 @@ object MailCfgDlg: TMailCfgDlg
end
object MaxInactivityLabel: TLabel
Left = 7
Top = 89
Top = 88
Width = 85
Height = 20
AutoSize = False
Caption = 'Max Inactivity'
end
object Label1: TLabel
Left = 7
Top = 115
Width = 85
Height = 20
AutoSize = False
Caption = 'Attempt Delivery'
end
object Label2: TLabel
Left = 7
Top = 141
Width = 85
Height = 20
AutoSize = False
Caption = 'Rescan Freq'
end
object AutoStartCheckBox: TCheckBox
Left = 7
Top = 10
Width = 118
Height = 19
Hint =
'Check this box if you want the mail server to start up automatic' +
'ally'
Height = 21
Hint = 'Automatically startup mail servers'
Caption = 'Auto Startup'
ParentShowHint = False
ShowHint = True
......@@ -111,8 +93,8 @@ object MailCfgDlg: TMailCfgDlg
end
object NetworkInterfaceEdit: TEdit
Left = 92
Top = 37
Width = 156
Top = 36
Width = 150
Height = 21
Hint =
'Enter your Network adapter'#39's static IP address here or blank for' +
......@@ -123,20 +105,22 @@ object MailCfgDlg: TMailCfgDlg
end
object MaxClientsEdit: TEdit
Left = 92
Top = 63
Top = 62
Width = 39
Height = 21
Hint = 'Maximum Number of simultaneous clients (default=10)'
Hint = 'Maximum number of simultaneous clients (default=10)'
ParentShowHint = False
ShowHint = True
TabOrder = 2
end
object MaxInactivityEdit: TEdit
Left = 92
Top = 89
Top = 88
Width = 39
Height = 21
Hint = 'Maximum Number of seconds of inactivity before disconnect'
Hint =
'Maximum number of seconds of inactivity before disconnect (defau' +
'lt=120)'
ParentShowHint = False
ShowHint = True
TabOrder = 3
......@@ -145,10 +129,8 @@ object MailCfgDlg: TMailCfgDlg
Left = 150
Top = 10
Width = 119
Height = 19
Hint =
'Check this box if you want to automatically lookup client'#39's host' +
'names via DNS'
Height = 21
Hint = 'Automatically lookup client'#39's hostnames via DNS'
Caption = 'Hostname Lookup'
ParentShowHint = False
ShowHint = True
......@@ -156,60 +138,25 @@ object MailCfgDlg: TMailCfgDlg
end
object DebugTXCheckBox: TCheckBox
Left = 150
Top = 60
Width = 124
Height = 20
Hint =
'Check this box to log all transmitted mail commands and response' +
's (for debugging)'
Top = 62
Width = 119
Height = 21
Hint = 'Log all transmitted mail commands and responses (for debugging)'
Caption = 'Log TX'
ParentShowHint = False
ShowHint = True
TabOrder = 5
end
object DebugHeadersCheckBox: TCheckBox
Left = 150
Top = 88
Width = 124
Height = 19
Hint = 'Check this box to log all received mail headers (for debugging)'
Caption = 'Log RX Headers'
ParentShowHint = False
ShowHint = True
TabOrder = 6
end
object LogFileCheckBox: TCheckBox
Left = 150
Top = 114
Width = 124
Height = 19
Hint =
'Check this box to save log entries to a file (in your DATA direc' +
'tory)'
Caption = 'Log to Disk'
ParentShowHint = False
ShowHint = True
TabOrder = 7
end
object DeliveryAttemptsEdit: TEdit
Left = 92
Top = 115
Width = 39
Height = 21
Hint = 'Maximum number of delivery attempts'
ParentShowHint = False
ShowHint = True
TabOrder = 8
end
object RescanFreqEdit: TEdit
Left = 92
Top = 141
Width = 39
Top = 88
Width = 119
Height = 21
Hint = 'Seconds between message base rescans'
Hint = 'Save log entries to a file (in your DATA directory)'
Caption = 'Log to Disk'
ParentShowHint = False
ShowHint = True
TabOrder = 9
TabOrder = 6
end
end
object SMTPTabSheet: TTabSheet
......@@ -228,7 +175,15 @@ object MailCfgDlg: TMailCfgDlg
Width = 85
Height = 21
AutoSize = False
Caption = 'Port'
Caption = 'Listening Port'
end
object InboundSoundLabel: TLabel
Left = 7
Top = 140
Width = 82
Height = 19
AutoSize = False
Caption = 'Receive Sound'
end
object RBLCheckBox: TCheckBox
Left = 92
......@@ -268,9 +223,7 @@ object MailCfgDlg: TMailCfgDlg
Top = 10
Width = 39
Height = 21
Hint =
'Enter the port number for the SMTP server to listen on (default=' +
'25)'
Hint = 'TCP port number for incoming SMTP connections (default=25)'
ParentShowHint = False
ShowHint = True
TabOrder = 3
......@@ -280,72 +233,43 @@ object MailCfgDlg: TMailCfgDlg
Top = 10
Width = 120
Height = 19
Hint = 'Allow mail to be sent to users by number (i.e "1@yourbbs.com")'
Hint =
'Allow mail to be received for users by number (i.e "1@yourbbs.co' +
'm")'
Caption = 'RX by User Number'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object DNSRadioButton: TRadioButton
Left = 7
Top = 62
Width = 85
object InboundSoundEdit: TEdit
Left = 92
Top = 140
Width = 150
Height = 21
Hint =
'Check this box to send mail directly to user'#39's mail servers (req' +
'uires DNS Server access)'
Caption = 'DNS Server'
Checked = True
Hint = 'Sound file to play when inbound SMTP connections are accepted'
ParentShowHint = False
ShowHint = True
TabOrder = 5
TabStop = True
OnClick = DNSRadioButtonClick
end
object DNSServerEdit: TEdit
Left = 92
Top = 62
Width = 156
object InboundSoundButton: TButton
Left = 247
Top = 140
Width = 20
Height = 21
Hint = 'Enter the host name or IP address of your DNS server'
ParentShowHint = False
ShowHint = True
Caption = '...'
TabOrder = 6
OnClick = InboundSoundButtonClick
end
object RelayRadioButton: TRadioButton
Left = 7
Top = 114
Width = 85
object DebugHeadersCheckBox: TCheckBox
Left = 150
Top = 62
Width = 119
Height = 21
Hint = 'Check this box to route all mail through your ISP'#39's SMTP Server'
Caption = 'Relay Server'
Hint = 'Log all received mail headers (for debugging)'
Caption = 'Log Headers'
ParentShowHint = False
ShowHint = True
TabOrder = 7
OnClick = DNSRadioButtonClick
end
object SMTPServerEdit: TEdit
Left = 92
Top = 114
Width = 156
Height = 21
Hint =
'Enter the host name or IP address of your ISP'#39's SMTP server (for' +
' relaying mail)'
ParentShowHint = False
ShowHint = True
TabOrder = 8
end
object TcpDnsCheckBox: TCheckBox
Left = 92
Top = 88
Width = 53
Height = 19
Hint = 'Use TCP packets (instead of UDP) for DNS queries'
Caption = 'TCP'
ParentShowHint = False
ShowHint = True
TabOrder = 9
end
end
object POP3TabSheet: TTabSheet
......@@ -355,18 +279,24 @@ object MailCfgDlg: TMailCfgDlg
Left = 7
Top = 10
Width = 83
Height = 19
Height = 21
AutoSize = False
Caption = 'Port'
Caption = 'Listening Port'
end
object POP3SoundLabel: TLabel
Left = 7
Top = 140
Width = 82
Height = 21
AutoSize = False
Caption = 'Login Sound'
end
object POP3PortEdit: TEdit
Left = 92
Top = 10
Width = 39
Height = 21
Hint =
'Enter the port number for the POP3 server to listen on (default=' +
'110)'
Hint = 'TCP port number for incoming POP3 connections (default=110)'
ParentShowHint = False
ShowHint = True
TabOrder = 0
......@@ -376,7 +306,7 @@ object MailCfgDlg: TMailCfgDlg
Top = 10
Width = 57
Height = 19
Hint = 'Check this box if you want POP3 sessions logged'
Hint = 'Log all POP3 user activity'
Caption = 'Log'
ParentShowHint = False
ShowHint = True
......@@ -387,99 +317,180 @@ object MailCfgDlg: TMailCfgDlg
Top = 10
Width = 66
Height = 19
Hint =
'Check this box to enable the POP3 server (requires restart of ma' +
'il server)'
Hint = 'Enable the POP3 server (requires restart of mail server)'
Caption = 'Enabled'
ParentShowHint = False
ShowHint = True
TabOrder = 2
OnClick = POP3EnabledCheckBoxClick
end
object POP3SoundEdit: TEdit
Left = 92
Top = 140
Width = 150
Height = 21
Hint = 'Sound file to play when accepting POP3 connections'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object POP3SoundButton: TButton
Left = 247
Top = 140
Width = 20
Height = 21
Caption = '...'
TabOrder = 4
OnClick = POP3SoundButtonClick
end
end
object SoundTabSheet: TTabSheet
Caption = 'Sound'
object SendMailTabSheet: TTabSheet
Caption = 'SendMail'
ImageIndex = 3
object POP3SoundLabel: TLabel
object OutboundSoundLabel: TLabel
Left = 7
Top = 11
Width = 52
Top = 140
Width = 82
Height = 19
AutoSize = False
Caption = 'POP3'
Caption = 'Sending Sound'
end
object InboundSoundLabel: TLabel
Left = 7
Top = 37
Width = 58
Height = 19
object RelayPortLabel: TLabel
Left = 160
Top = 114
Width = 32
Height = 21
Alignment = taRightJustify
AutoSize = False
Caption = 'SMTP In'
Caption = 'Port'
end
object OutboundSoundLabel: TLabel
object Label1: TLabel
Left = 7
Top = 63
Width = 58
Height = 19
Top = 10
Width = 85
Height = 20
AutoSize = False
Caption = 'SMTP Out'
Caption = 'Max Attempts'
end
object POP3SoundEdit: TEdit
Left = 72
Top = 11
Width = 169
Height = 21
Hint = 'WAV file to play when accepting POP3 connections'
ParentShowHint = False
ShowHint = True
TabOrder = 0
object Label2: TLabel
Left = 136
Top = 10
Width = 57
Height = 20
Hint = 'Frequency (in seconds) of delivery attempts'
Alignment = taRightJustify
AutoSize = False
Caption = 'Frequency'
end
object POP3SoundButton: TButton
object OutboundSoundButton: TButton
Left = 247
Top = 11
Top = 140
Width = 20
Height = 21
Caption = '...'
TabOrder = 0
OnClick = OutboundSoundButtonClick
end
object OutboundSoundEdit: TEdit
Left = 92
Top = 140
Width = 150
Height = 21
Hint = 'Sound file to play when sending mail'
ParentShowHint = False
ShowHint = True
TabOrder = 1
OnClick = POP3SoundButtonClick
end
object InboundSoundEdit: TEdit
Left = 72
Top = 37
Width = 168
object DNSRadioButton: TRadioButton
Left = 7
Top = 36
Width = 85
Height = 21
Hint = 'WAV file to play when inbound SMTP connections are accepted'
Hint =
'Send mail directly to addressed mail server (requires DNS server' +
' access)'
Caption = 'DNS Server'
Checked = True
ParentShowHint = False
ShowHint = True
TabOrder = 2
TabStop = True
OnClick = DNSRadioButtonClick
end
object InboundSoundButton: TButton
Left = 247
Top = 37
Width = 20
object DNSServerEdit: TEdit
Left = 92
Top = 36
Width = 150
Height = 21
Caption = '...'
Hint = 'Host name or IP address of your ISP'#39's DNS server'
ParentShowHint = False
ShowHint = True
TabOrder = 3
OnClick = InboundSoundButtonClick
end
object OutboundSoundButton: TButton
Left = 247
Top = 63
Width = 20
object TcpDnsCheckBox: TCheckBox
Left = 203
Top = 62
Width = 53
Height = 21
Caption = '...'
Hint = 'Use TCP packets (instead of UDP) for DNS queries'
Caption = 'TCP'
ParentShowHint = False
ShowHint = True
TabOrder = 4
OnClick = OutboundSoundButtonClick
end
object OutboundSoundEdit: TEdit
Left = 72
Top = 63
Width = 168
object RelayRadioButton: TRadioButton
Left = 7
Top = 88
Width = 85
Height = 21
Hint = 'WAV file to play when sending mail'
Hint = 'Route all mail through an SMTP relay server'
Caption = 'Relay Server'
ParentShowHint = False
ShowHint = True
TabOrder = 5
OnClick = DNSRadioButtonClick
end
object RelayServerEdit: TEdit
Left = 92
Top = 88
Width = 150
Height = 21
Hint =
'Host name or IP address of external SMTP server (for relaying ma' +
'il)'
ParentShowHint = False
ShowHint = True
TabOrder = 6
end
object RelayPortEdit: TEdit
Left = 203
Top = 114
Width = 39
Height = 21
Hint = 'TCP port number for the SMTP relay server (default=25)'
ParentShowHint = False
ShowHint = True
TabOrder = 7
end
object DeliveryAttemptsEdit: TEdit
Left = 92
Top = 10
Width = 39
Height = 21
Hint = 'Maximum number of delivery attempts'
ParentShowHint = False
ShowHint = True
TabOrder = 8
end
object RescanFreqEdit: TEdit
Left = 203
Top = 10
Width = 39
Height = 21
Hint = 'Seconds between message base rescans'
ParentShowHint = False
ShowHint = True
TabOrder = 9
end
end
end
......
......@@ -74,34 +74,36 @@ __published:
TLabel *TelnetPortLabel;
TEdit *SMTPPortEdit;
TCheckBox *UserNumberCheckBox;
TRadioButton *DNSRadioButton;
TEdit *DNSServerEdit;
TRadioButton *RelayRadioButton;
TEdit *SMTPServerEdit;
TCheckBox *HostnameCheckBox;
TCheckBox *DebugTXCheckBox;
TCheckBox *DebugHeadersCheckBox;
TCheckBox *LogFileCheckBox;
TTabSheet *POP3TabSheet;
TLabel *POP3PortLabel;
TEdit *POP3PortEdit;
TCheckBox *POP3LogCheckBox;
TCheckBox *POP3EnabledCheckBox;
TLabel *Label1;
TEdit *DeliveryAttemptsEdit;
TLabel *Label2;
TEdit *RescanFreqEdit;
TTabSheet *SoundTabSheet;
TTabSheet *SendMailTabSheet;
TButton *OutboundSoundButton;
TEdit *OutboundSoundEdit;
TLabel *OutboundSoundLabel;
TLabel *POP3SoundLabel;
TEdit *POP3SoundEdit;
TButton *POP3SoundButton;
TRadioButton *DNSRadioButton;
TEdit *DNSServerEdit;
TCheckBox *TcpDnsCheckBox;
TRadioButton *RelayRadioButton;
TEdit *RelayServerEdit;
TEdit *RelayPortEdit;
TLabel *InboundSoundLabel;
TEdit *InboundSoundEdit;
TButton *InboundSoundButton;
TButton *OutboundSoundButton;
TEdit *OutboundSoundEdit;
TLabel *OutboundSoundLabel;
TCheckBox *TcpDnsCheckBox;
TLabel *RelayPortLabel;
TLabel *Label1;
TEdit *DeliveryAttemptsEdit;
TLabel *Label2;
TEdit *RescanFreqEdit;
TCheckBox *DebugHeadersCheckBox;
void __fastcall InboundSoundButtonClick(TObject *Sender);
void __fastcall OutboundSoundButtonClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment