Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions public_html/lists/admin/send_core.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,11 @@
include 'sendemaillib.php';

// OK, let's get to sending!
$emailaddresses = explode(',', $messagedata['testtarget']);
if (defined('TEST_EMAIL_ALWAYS_TO') && TEST_EMAIL_ALWAYS_TO) {
$emailaddresses = array(TEST_EMAIL_ALWAYS_TO);
} else {
$emailaddresses = explode(',', $messagedata['testtarget']);
}
if (count($emailaddresses) > SENDTEST_MAX) {
foreach ($GLOBALS['plugins'] as $plname => $plugin) {
$plugin->processError('Send test capped from '.count($emailaddresses).' to '.SENDTEST_MAX);
Expand Down Expand Up @@ -983,7 +987,19 @@
</span>
</div>
</div>';


if (defined('TEST_EMAIL_ALWAYS_TO') && TEST_EMAIL_ALWAYS_TO) {
$sendtest_content = '<div class="sendTest" id="sendTest">
' .$sendtestresult.Help('sendtest').' <b>'.s('to email address(es)').':</b><br />'.
'<p><i>&nbsp; '.s('All test emails will go to %s',TEST_EMAIL_ALWAYS_TO).'</i></p>'.
'<div class="input-group">
<input type="hidden" name="testtarget" value="'.htmlspecialchars(TEST_EMAIL_ALWAYS_TO).'" />
<span class="input-group-btn">
<input class="submit btn btn-primary" type="submit" name="sendtest" value="' .s('Send Test').'" />
</span>
</div>
</div>';
}
// notification of progress of message sending
// defaulting to admin_details['email'] gives the wrong impression that this is the
// value in the database, so it is better to leave that empty instead
Expand Down
4 changes: 4 additions & 0 deletions public_html/lists/config/config_extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@
// test emails are sent to
define('SEND_ONE_TESTMAIL', 0);

// test emails
// with this setting you can ensure that test emails are always sent to the same email address
define('TEST_EMAIL_ALWAYS_TO',false);

// send a webpage. You can send the contents of a webpage, by adding
// [URL:http://website/file.html] as the content of a message. This can also be personalised
// for users by using eg
Expand Down
Loading