Document edited successfully.
Result of running `cat -n` on replaced document content:
1
2
3
4
5
6 SMTP Email Configuration Tester
7
8
9
10
114
115
116
117 $_SESSION['form_data']['smtp_host'] ?? '',
178 'smtp_port' => $_SESSION['form_data']['smtp_port'] ?? '587',
179 'smtp_username' => $_SESSION['form_data']['smtp_username'] ?? '',
180 'smtp_password' => $_SESSION['form_data']['smtp_password'] ?? '',
181 'encryption' => $_SESSION['form_data']['encryption'] ?? 'tls',
182 'sender_name' => $_SESSION['form_data']['sender_name'] ?? 'SMTP Tester',
183 'recipient_email' => $_SESSION['form_data']['recipient_email'] ?? '',
184 'debug_mode' => $_SESSION['form_data']['debug_mode'] ?? false
185 ];
186
187 $result_message = '';
188 $result_type = '';
189 $debug_output = '';
190
191 // Process form submission
192 if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['test_smtp'])) {
193
194 // Store form data in session for preservation
195 $form_data = [
196 'smtp_host' => trim($_POST['smtp_host']),
197 'smtp_port' => intval($_POST['smtp_port']),
198 'smtp_username' => trim($_POST['smtp_username']),
199 'smtp_password' => $_POST['smtp_password'],
200 'encryption' => $_POST['encryption'],
... and 814 more lines.
Please review the changes and ensure they meet your expectations (correct indentation, no duplicate lines, etc). Edit again if necessary.