From 54064d991f2ddc65fafafed00037fc13279b79cc Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 17 Nov 2000 04:31:18 +0000
Subject: [PATCH] Added SendMail enabled checkbox (to be able to disable
 SendMail thread).

---
 src/sbbs3/ctrl/MailCfgDlgUnit.cpp |  33 +-
 src/sbbs3/ctrl/MailCfgDlgUnit.dfm | 510 +++++++++++++++---------------
 src/sbbs3/ctrl/MailCfgDlgUnit.h   |  25 +-
 3 files changed, 309 insertions(+), 259 deletions(-)

diff --git a/src/sbbs3/ctrl/MailCfgDlgUnit.cpp b/src/sbbs3/ctrl/MailCfgDlgUnit.cpp
index a3236d3977..607744e620 100644
--- a/src/sbbs3/ctrl/MailCfgDlgUnit.cpp
+++ b/src/sbbs3/ctrl/MailCfgDlgUnit.cpp
@@ -124,9 +124,12 @@ void __fastcall TMailCfgDlg::FormShow(TObject *Sender)
     	&MAIL_OPT_USE_RSS;
     TcpDnsCheckBox->Checked=MainForm->mail_startup.options
     	&MAIL_OPT_USE_TCP_DNS;
+    SendMailCheckBox->Checked=
+        !(MainForm->mail_startup.options&MAIL_OPT_NO_SENDMAIL);
 
     DNSRadioButtonClick(Sender);
 	POP3EnabledCheckBoxClick(Sender);
+    SendMailCheckBoxClick(Sender);
     PageControl->ActivePage=GeneralTabSheet;
 }
 //---------------------------------------------------------------------------
@@ -224,6 +227,10 @@ void __fastcall TMailCfgDlg::OKBtnClick(TObject *Sender)
     	MainForm->mail_startup.options|=MAIL_OPT_USE_TCP_DNS;
     else
 	    MainForm->mail_startup.options&=~MAIL_OPT_USE_TCP_DNS;
+    if(SendMailCheckBox->Checked==false)
+        MainForm->mail_startup.options|=MAIL_OPT_NO_SENDMAIL;
+    else
+        MainForm->mail_startup.options&=~MAIL_OPT_NO_SENDMAIL;
 
     MainForm->MailAutoStart=AutoStartCheckBox->Checked;
     MainForm->MailLogFile=LogFileCheckBox->Checked;
@@ -256,8 +263,8 @@ void __fastcall TMailCfgDlg::DNSRadioButtonClick(TObject *Sender)
 void __fastcall TMailCfgDlg::POP3EnabledCheckBoxClick(TObject *Sender)
 {
 	POP3PortEdit->Enabled=POP3EnabledCheckBox->Checked;
-    POP3SoundEdit->Enabled=POP3EnabledCheckBox->Checked;
     POP3PortLabel->Enabled=POP3EnabledCheckBox->Checked;
+    POP3SoundEdit->Enabled=POP3EnabledCheckBox->Checked;
     POP3SoundLabel->Enabled=POP3EnabledCheckBox->Checked;
     POP3SoundButton->Enabled=POP3EnabledCheckBox->Checked;
     POP3LogCheckBox->Enabled=POP3EnabledCheckBox->Checked;
@@ -265,3 +272,27 @@ void __fastcall TMailCfgDlg::POP3EnabledCheckBoxClick(TObject *Sender)
 //---------------------------------------------------------------------------
 
 
+void __fastcall TMailCfgDlg::SendMailCheckBoxClick(TObject *Sender)
+{
+    bool checked=SendMailCheckBox->Checked;
+
+    DeliveryAttemptsEdit->Enabled=checked;
+    DeliveryAttemptsLabel->Enabled=checked;
+    RescanFreqEdit->Enabled=checked;
+    RescanFreqLabel->Enabled=checked;
+    DNSRadioButton->Enabled=checked;
+    DNSServerEdit->Enabled=checked;
+    TcpDnsCheckBox->Enabled=checked;
+    RelayRadioButton->Enabled=checked;
+    RelayServerEdit->Enabled=checked;
+    RelayPortEdit->Enabled=checked;
+    RelayPortLabel->Enabled=checked;
+    OutboundSoundEdit->Enabled=checked;
+    OutboundSoundLabel->Enabled=checked;
+    OutboundSoundButton->Enabled=checked;
+
+    if(checked)
+        DNSRadioButtonClick(Sender);
+}
+//---------------------------------------------------------------------------
+
diff --git a/src/sbbs3/ctrl/MailCfgDlgUnit.dfm b/src/sbbs3/ctrl/MailCfgDlgUnit.dfm
index a1d843d580..f049e0d943 100644
--- a/src/sbbs3/ctrl/MailCfgDlgUnit.dfm
+++ b/src/sbbs3/ctrl/MailCfgDlgUnit.dfm
@@ -1,22 +1,22 @@
 object MailCfgDlg: TMailCfgDlg
-  Left = 492
-  Top = 423
+  Left = 403
+  Top = 140
   BorderStyle = bsDialog
   Caption = 'Mail Server Configuration'
-  ClientHeight = 246
-  ClientWidth = 286
+  ClientHeight = 303
+  ClientWidth = 352
   Color = clBtnFace
   ParentFont = True
   OldCreateOrder = True
   Position = poScreenCenter
   OnShow = FormShow
-  PixelsPerInch = 96
-  TextHeight = 13
+  PixelsPerInch = 120
+  TextHeight = 16
   object OKBtn: TButton
-    Left = 20
-    Top = 210
-    Width = 75
-    Height = 25
+    Left = 25
+    Top = 258
+    Width = 92
+    Height = 31
     Anchors = [akLeft, akBottom]
     Caption = 'OK'
     Default = True
@@ -25,10 +25,10 @@ object MailCfgDlg: TMailCfgDlg
     OnClick = OKBtnClick
   end
   object CancelBtn: TButton
-    Left = 104
-    Top = 210
-    Width = 76
-    Height = 25
+    Left = 128
+    Top = 258
+    Width = 94
+    Height = 31
     Anchors = [akLeft, akBottom]
     Cancel = True
     Caption = 'Cancel'
@@ -36,55 +36,55 @@ object MailCfgDlg: TMailCfgDlg
     TabOrder = 1
   end
   object ApplyButton: TButton
-    Left = 189
-    Top = 210
-    Width = 75
-    Height = 25
+    Left = 233
+    Top = 258
+    Width = 92
+    Height = 31
     Anchors = [akLeft, akBottom]
     Caption = 'Apply'
     TabOrder = 2
     OnClick = OKBtnClick
   end
   object PageControl: TPageControl
-    Left = 3
-    Top = 3
-    Width = 278
-    Height = 199
-    ActivePage = GeneralTabSheet
+    Left = 4
+    Top = 4
+    Width = 342
+    Height = 245
+    ActivePage = SendMailTabSheet
     TabOrder = 3
     object GeneralTabSheet: TTabSheet
       Caption = 'General'
       object InterfaceLabel: TLabel
-        Left = 7
-        Top = 36
-        Width = 85
-        Height = 20
+        Left = 9
+        Top = 44
+        Width = 104
+        Height = 24
         AutoSize = False
         Caption = 'Interface (IP)'
         ParentShowHint = False
         ShowHint = True
       end
       object MaxClientsLabel: TLabel
-        Left = 7
-        Top = 62
-        Width = 85
-        Height = 20
+        Left = 9
+        Top = 76
+        Width = 104
+        Height = 24
         AutoSize = False
         Caption = 'Max Clients'
       end
       object MaxInactivityLabel: TLabel
-        Left = 7
-        Top = 88
-        Width = 85
-        Height = 20
+        Left = 9
+        Top = 108
+        Width = 104
+        Height = 24
         AutoSize = False
         Caption = 'Max Inactivity'
       end
       object AutoStartCheckBox: TCheckBox
-        Left = 7
-        Top = 10
-        Width = 118
-        Height = 21
+        Left = 9
+        Top = 12
+        Width = 145
+        Height = 24
         Hint = 'Automatically startup mail servers'
         Caption = 'Auto Startup'
         ParentShowHint = False
@@ -92,10 +92,10 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 0
       end
       object NetworkInterfaceEdit: TEdit
-        Left = 92
-        Top = 36
-        Width = 150
-        Height = 21
+        Left = 113
+        Top = 44
+        Width = 185
+        Height = 24
         Hint = 
           'Enter your Network adapter'#39's static IP address here or blank for' +
           ' <ANY>'
@@ -104,20 +104,20 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 1
       end
       object MaxClientsEdit: TEdit
-        Left = 92
-        Top = 62
-        Width = 39
-        Height = 21
+        Left = 113
+        Top = 76
+        Width = 48
+        Height = 24
         Hint = 'Maximum number of simultaneous clients (default=10)'
         ParentShowHint = False
         ShowHint = True
         TabOrder = 2
       end
       object MaxInactivityEdit: TEdit
-        Left = 92
-        Top = 88
-        Width = 39
-        Height = 21
+        Left = 113
+        Top = 108
+        Width = 48
+        Height = 24
         Hint = 
           'Maximum number of seconds of inactivity before disconnect (defau' +
           'lt=120)'
@@ -126,10 +126,10 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 3
       end
       object HostnameCheckBox: TCheckBox
-        Left = 150
-        Top = 10
-        Width = 119
-        Height = 21
+        Left = 185
+        Top = 12
+        Width = 146
+        Height = 24
         Hint = 'Automatically lookup client'#39's hostnames via DNS'
         Caption = 'Hostname Lookup'
         ParentShowHint = False
@@ -137,10 +137,10 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 4
       end
       object DebugTXCheckBox: TCheckBox
-        Left = 150
-        Top = 62
-        Width = 119
-        Height = 21
+        Left = 185
+        Top = 76
+        Width = 146
+        Height = 26
         Hint = 'Log all transmitted mail commands and responses (for debugging)'
         Caption = 'Log TX'
         ParentShowHint = False
@@ -148,10 +148,10 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 5
       end
       object LogFileCheckBox: TCheckBox
-        Left = 150
-        Top = 88
-        Width = 119
-        Height = 21
+        Left = 185
+        Top = 108
+        Width = 146
+        Height = 26
         Hint = 'Save log entries to a file (in your DATA directory)'
         Caption = 'Log to Disk'
         ParentShowHint = False
@@ -163,33 +163,25 @@ object MailCfgDlg: TMailCfgDlg
       Caption = 'SMTP'
       ImageIndex = 1
       object SpamFilterLabel: TLabel
-        Left = 7
-        Top = 36
-        Width = 57
-        Height = 21
+        Left = 9
+        Top = 44
+        Width = 75
+        Height = 16
         Caption = 'Spam Filters'
       end
       object TelnetPortLabel: TLabel
-        Left = 7
-        Top = 10
-        Width = 85
-        Height = 21
+        Left = 9
+        Top = 12
+        Width = 104
+        Height = 26
         AutoSize = False
         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
-        Top = 36
-        Width = 46
-        Height = 19
+        Left = 113
+        Top = 44
+        Width = 57
+        Height = 24
         Hint = 'Use Realtime Blackhole List (RBL) Spam Filter'
         Caption = 'RBL'
         ParentShowHint = False
@@ -197,10 +189,10 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 0
       end
       object RSSCheckBox: TCheckBox
-        Left = 150
-        Top = 36
-        Width = 46
-        Height = 19
+        Left = 185
+        Top = 44
+        Width = 56
+        Height = 24
         Hint = 'Use Relay Spam Stopper (RSS) Spam Filter'
         Caption = 'RSS'
         ParentShowHint = False
@@ -208,10 +200,10 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 1
       end
       object DULCheckBox: TCheckBox
-        Left = 208
-        Top = 36
-        Width = 46
-        Height = 19
+        Left = 256
+        Top = 44
+        Width = 57
+        Height = 24
         Hint = 'Use Dail-up User List (DUL) Spam Filter'
         Caption = 'DUL'
         ParentShowHint = False
@@ -219,20 +211,20 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 2
       end
       object SMTPPortEdit: TEdit
-        Left = 92
-        Top = 10
-        Width = 39
-        Height = 21
+        Left = 113
+        Top = 12
+        Width = 48
+        Height = 24
         Hint = 'TCP port number for incoming SMTP connections (default=25)'
         ParentShowHint = False
         ShowHint = True
         TabOrder = 3
       end
       object UserNumberCheckBox: TCheckBox
-        Left = 150
-        Top = 10
-        Width = 120
-        Height = 19
+        Left = 185
+        Top = 12
+        Width = 147
+        Height = 24
         Hint = 
           'Allow mail to be received for users by number (i.e "1@yourbbs.co' +
           'm")'
@@ -241,71 +233,44 @@ object MailCfgDlg: TMailCfgDlg
         ShowHint = True
         TabOrder = 4
       end
-      object InboundSoundEdit: TEdit
-        Left = 92
-        Top = 140
-        Width = 150
-        Height = 21
-        Hint = 'Sound file to play when inbound SMTP connections are accepted'
-        ParentShowHint = False
-        ShowHint = True
-        TabOrder = 5
-      end
-      object InboundSoundButton: TButton
-        Left = 247
-        Top = 140
-        Width = 20
-        Height = 21
-        Caption = '...'
-        TabOrder = 6
-        OnClick = InboundSoundButtonClick
-      end
       object DebugHeadersCheckBox: TCheckBox
-        Left = 150
-        Top = 62
-        Width = 119
-        Height = 21
+        Left = 185
+        Top = 76
+        Width = 146
+        Height = 26
         Hint = 'Log all received mail headers (for debugging)'
         Caption = 'Log Headers'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 7
+        TabOrder = 5
       end
     end
     object POP3TabSheet: TTabSheet
       Caption = 'POP3'
       ImageIndex = 2
       object POP3PortLabel: TLabel
-        Left = 7
-        Top = 10
-        Width = 83
-        Height = 21
+        Left = 9
+        Top = 12
+        Width = 102
+        Height = 26
         AutoSize = False
         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
+        Left = 113
+        Top = 12
+        Width = 48
+        Height = 24
         Hint = 'TCP port number for incoming POP3 connections (default=110)'
         ParentShowHint = False
         ShowHint = True
         TabOrder = 0
       end
       object POP3LogCheckBox: TCheckBox
-        Left = 150
-        Top = 10
-        Width = 57
-        Height = 19
+        Left = 185
+        Top = 12
+        Width = 70
+        Height = 24
         Hint = 'Log all POP3 user activity'
         Caption = 'Log'
         ParentShowHint = False
@@ -313,10 +278,10 @@ object MailCfgDlg: TMailCfgDlg
         TabOrder = 1
       end
       object POP3EnabledCheckBox: TCheckBox
-        Left = 208
-        Top = 10
-        Width = 66
-        Height = 19
+        Left = 256
+        Top = 12
+        Width = 81
+        Height = 24
         Hint = 'Enable the POP3 server (requires restart of mail server)'
         Caption = 'Enabled'
         ParentShowHint = False
@@ -324,88 +289,42 @@ object MailCfgDlg: TMailCfgDlg
         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 SendMailTabSheet: TTabSheet
       Caption = 'SendMail'
       ImageIndex = 3
-      object OutboundSoundLabel: TLabel
-        Left = 7
-        Top = 140
-        Width = 82
-        Height = 19
-        AutoSize = False
-        Caption = 'Sending Sound'
-      end
       object RelayPortLabel: TLabel
-        Left = 160
-        Top = 114
-        Width = 32
-        Height = 21
+        Left = 197
+        Top = 172
+        Width = 39
+        Height = 26
         Alignment = taRightJustify
         AutoSize = False
         Caption = 'Port'
       end
-      object Label1: TLabel
-        Left = 7
-        Top = 10
-        Width = 85
-        Height = 20
+      object DeliveryAttemptsLabel: TLabel
+        Left = 9
+        Top = 44
+        Width = 104
+        Height = 24
         AutoSize = False
         Caption = 'Max Attempts'
       end
-      object Label2: TLabel
-        Left = 136
-        Top = 10
-        Width = 57
-        Height = 20
+      object RescanFreqLabel: TLabel
+        Left = 167
+        Top = 44
+        Width = 71
+        Height = 24
         Hint = 'Frequency (in seconds) of delivery attempts'
         Alignment = taRightJustify
         AutoSize = False
         Caption = 'Frequency'
       end
-      object OutboundSoundButton: TButton
-        Left = 247
-        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
-      end
       object DNSRadioButton: TRadioButton
-        Left = 7
-        Top = 36
-        Width = 85
-        Height = 21
+        Left = 9
+        Top = 76
+        Width = 104
+        Height = 26
         Hint = 
           'Send mail directly to addressed mail server (requires DNS server' +
           ' access)'
@@ -413,84 +332,181 @@ object MailCfgDlg: TMailCfgDlg
         Checked = True
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 2
+        TabOrder = 0
         TabStop = True
         OnClick = DNSRadioButtonClick
       end
       object DNSServerEdit: TEdit
-        Left = 92
-        Top = 36
-        Width = 150
-        Height = 21
+        Left = 113
+        Top = 76
+        Width = 185
+        Height = 24
         Hint = 'Host name or IP address of your ISP'#39's DNS server'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 3
+        TabOrder = 1
       end
       object TcpDnsCheckBox: TCheckBox
-        Left = 203
-        Top = 62
-        Width = 53
-        Height = 21
+        Left = 250
+        Top = 108
+        Width = 65
+        Height = 26
         Hint = 'Use TCP packets (instead of UDP) for DNS queries'
         Caption = 'TCP'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 4
+        TabOrder = 2
       end
       object RelayRadioButton: TRadioButton
-        Left = 7
-        Top = 88
-        Width = 85
-        Height = 21
+        Left = 9
+        Top = 140
+        Width = 104
+        Height = 26
         Hint = 'Route all mail through an SMTP relay server'
         Caption = 'Relay Server'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 5
+        TabOrder = 3
         OnClick = DNSRadioButtonClick
       end
       object RelayServerEdit: TEdit
-        Left = 92
-        Top = 88
-        Width = 150
-        Height = 21
+        Left = 113
+        Top = 140
+        Width = 185
+        Height = 24
         Hint = 
           'Host name or IP address of external SMTP server (for relaying ma' +
           'il)'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 6
+        TabOrder = 4
       end
       object RelayPortEdit: TEdit
-        Left = 203
-        Top = 114
-        Width = 39
-        Height = 21
+        Left = 250
+        Top = 172
+        Width = 48
+        Height = 24
         Hint = 'TCP port number for the SMTP relay server (default=25)'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 7
+        TabOrder = 5
       end
       object DeliveryAttemptsEdit: TEdit
-        Left = 92
-        Top = 10
-        Width = 39
-        Height = 21
+        Left = 113
+        Top = 44
+        Width = 48
+        Height = 24
         Hint = 'Maximum number of delivery attempts'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 8
+        TabOrder = 6
       end
       object RescanFreqEdit: TEdit
-        Left = 203
-        Top = 10
-        Width = 39
-        Height = 21
+        Left = 250
+        Top = 44
+        Width = 48
+        Height = 24
         Hint = 'Seconds between message base rescans'
         ParentShowHint = False
         ShowHint = True
-        TabOrder = 9
+        TabOrder = 7
+      end
+      object SendMailCheckBox: TCheckBox
+        Left = 9
+        Top = 12
+        Width = 81
+        Height = 24
+        Hint = 'Enable the SendMail thread (requires restart of mail server)'
+        Caption = 'Enabled'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 8
+        OnClick = SendMailCheckBoxClick
+      end
+    end
+    object SoundTabSheet: TTabSheet
+      Caption = 'Sound'
+      ImageIndex = 4
+      object SMTPSoundLabel: TLabel
+        Left = 9
+        Top = 12
+        Width = 101
+        Height = 24
+        AutoSize = False
+        Caption = 'Receive Mail'
+      end
+      object POP3SoundLabel: TLabel
+        Left = 9
+        Top = 76
+        Width = 101
+        Height = 26
+        AutoSize = False
+        Caption = 'POP3 Login'
+      end
+      object OutboundSoundLabel: TLabel
+        Left = 9
+        Top = 44
+        Width = 101
+        Height = 24
+        AutoSize = False
+        Caption = 'Sending Mail'
+      end
+      object InboundSoundEdit: TEdit
+        Left = 113
+        Top = 12
+        Width = 185
+        Height = 24
+        Hint = 'Sound file to play when inbound SMTP connections are accepted'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 0
+      end
+      object InboundSoundButton: TButton
+        Left = 304
+        Top = 12
+        Width = 25
+        Height = 26
+        Caption = '...'
+        TabOrder = 1
+        OnClick = InboundSoundButtonClick
+      end
+      object POP3SoundEdit: TEdit
+        Left = 113
+        Top = 76
+        Width = 185
+        Height = 24
+        Hint = 'Sound file to play when accepting POP3 connections'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 2
+      end
+      object POP3SoundButton: TButton
+        Left = 304
+        Top = 76
+        Width = 25
+        Height = 26
+        Caption = '...'
+        TabOrder = 3
+        OnClick = POP3SoundButtonClick
+      end
+      object OutboundSoundEdit: TEdit
+        Left = 113
+        Top = 44
+        Width = 185
+        Height = 24
+        Hint = 'Sound file to play when sending mail'
+        ParentShowHint = False
+        ShowHint = True
+        TabOrder = 4
+      end
+      object OutboundSoundButton: TButton
+        Left = 304
+        Top = 44
+        Width = 25
+        Height = 26
+        Caption = '...'
+        TabOrder = 5
+        OnClick = OutboundSoundButtonClick
       end
     end
   end
diff --git a/src/sbbs3/ctrl/MailCfgDlgUnit.h b/src/sbbs3/ctrl/MailCfgDlgUnit.h
index 86b18ef08d..43dfef9b89 100644
--- a/src/sbbs3/ctrl/MailCfgDlgUnit.h
+++ b/src/sbbs3/ctrl/MailCfgDlgUnit.h
@@ -83,27 +83,29 @@ __published:
     TCheckBox *POP3LogCheckBox;
     TCheckBox *POP3EnabledCheckBox;
     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;
     TLabel *RelayPortLabel;
-    TLabel *Label1;
+    TLabel *DeliveryAttemptsLabel;
     TEdit *DeliveryAttemptsEdit;
-    TLabel *Label2;
+    TLabel *RescanFreqLabel;
     TEdit *RescanFreqEdit;
     TCheckBox *DebugHeadersCheckBox;
+    TTabSheet *SoundTabSheet;
+    TLabel *SMTPSoundLabel;
+    TEdit *InboundSoundEdit;
+    TButton *InboundSoundButton;
+    TLabel *POP3SoundLabel;
+    TEdit *POP3SoundEdit;
+    TButton *POP3SoundButton;
+    TLabel *OutboundSoundLabel;
+    TEdit *OutboundSoundEdit;
+    TButton *OutboundSoundButton;
+    TCheckBox *SendMailCheckBox;
     void __fastcall InboundSoundButtonClick(TObject *Sender);
     void __fastcall OutboundSoundButtonClick(TObject *Sender);
     void __fastcall FormShow(TObject *Sender);
@@ -111,6 +113,7 @@ __published:
 	void __fastcall POP3SoundButtonClick(TObject *Sender);
 	void __fastcall DNSRadioButtonClick(TObject *Sender);
 	void __fastcall POP3EnabledCheckBoxClick(TObject *Sender);
+    void __fastcall SendMailCheckBoxClick(TObject *Sender);
 private:
 public:
 	virtual __fastcall TMailCfgDlg(TComponent* AOwner);
-- 
GitLab