[ticket/16180] Allow adding message to test email

PHPBB3-16180
This commit is contained in:
mrgoldy 2020-03-13 00:09:50 +01:00
parent b732b4d8c8
commit 0198029ea6
2 changed files with 7 additions and 1 deletions

View file

@ -648,6 +648,7 @@ class acp_board
$messenger->anti_abuse_headers($config, $user); $messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array( $messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($user->data['username']), 'USERNAME' => htmlspecialchars_decode($user->data['username']),
'MESSAGE' => htmlspecialchars_decode($request->variable('send_test_email_text', '', true)),
)); ));
$messenger->send(NOTIFY_EMAIL); $messenger->send(NOTIFY_EMAIL);
@ -1167,6 +1168,7 @@ class acp_board
{ {
global $user; global $user;
return '<input class="button2" type="submit" id="' . $key . '" name="' . $key . '" value="' . $user->lang['SEND_TEST_EMAIL'] . '" />'; return '<input class="button2" type="submit" id="' . $key . '" name="' . $key . '" value="' . $user->lang('SEND_TEST_EMAIL') . '" />
<textarea id="' . $key . '_text" name="' . $key . '_text" placeholder="' . $user->lang('MESSAGE') . '"></textarea>';
} }
} }

View file

@ -4,6 +4,10 @@ Hello {USERNAME},
Congratulations. If you received this email, phpBB is correctly configured to send emails. Congratulations. If you received this email, phpBB is correctly configured to send emails.
<!-- IF MESSAGE -->
{MESSAGE}
<!-- ENDIF -->
In case you require assistance, please visit the phpBB support forums - https://www.phpbb.com/community/ In case you require assistance, please visit the phpBB support forums - https://www.phpbb.com/community/
{EMAIL_SIG} {EMAIL_SIG}