File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 461
461
include 'sendemaillib.php ' ;
462
462
463
463
// OK, let's get to sending!
464
- $ emailaddresses = explode (', ' , $ messagedata ['testtarget ' ]);
464
+ if (defined ('TEST_EMAIL_ALWAYS_TO ' ) && TEST_EMAIL_ALWAYS_TO ) {
465
+ $ emailaddresses = array (TEST_EMAIL_ALWAYS_TO );
466
+ } else {
467
+ $ emailaddresses = explode (', ' , $ messagedata ['testtarget ' ]);
468
+ }
465
469
if (count ($ emailaddresses ) > SENDTEST_MAX ) {
466
470
foreach ($ GLOBALS ['plugins ' ] as $ plname => $ plugin ) {
467
471
$ plugin ->processError ('Send test capped from ' .count ($ emailaddresses ).' to ' .SENDTEST_MAX );
983
987
</span>
984
988
</div>
985
989
</div> ' ;
986
-
990
+
991
+ if (defined ('TEST_EMAIL_ALWAYS_TO ' ) && TEST_EMAIL_ALWAYS_TO ) {
992
+ $ sendtest_content = '<div class="sendTest" id="sendTest">
993
+ ' .$ sendtestresult .Help ('sendtest ' ).' <b> ' .s ('to email address(es) ' ).':</b><br /> ' .
994
+ '<p><i> ' .s ('All test emails will go to %s ' ,TEST_EMAIL_ALWAYS_TO ).'</i></p> ' .
995
+ '<div class="input-group">
996
+ <input type="hidden" name="testtarget" value=" ' .htmlspecialchars (TEST_EMAIL_ALWAYS_TO ).'" />
997
+ <span class="input-group-btn">
998
+ <input class="submit btn btn-primary" type="submit" name="sendtest" value=" ' .s ('Send Test ' ).'" />
999
+ </span>
1000
+ </div>
1001
+ </div> ' ;
1002
+ }
987
1003
// notification of progress of message sending
988
1004
// defaulting to admin_details['email'] gives the wrong impression that this is the
989
1005
// value in the database, so it is better to leave that empty instead
Original file line number Diff line number Diff line change 530
530
// test emails are sent to
531
531
define ('SEND_ONE_TESTMAIL ' , 0 );
532
532
533
+ // test emails
534
+ // with this setting you can ensure that test emails are always sent to the same email address
535
+ define ('TEST_EMAIL_ALWAYS_TO ' ,false );
536
+
533
537
// send a webpage. You can send the contents of a webpage, by adding
534
538
// [URL:http://website/file.html] as the content of a message. This can also be personalised
535
539
// for users by using eg
You can’t perform that action at this time.
0 commit comments