From fb6afb9edb933fc097fdc776ca2e3ab1880a47cd Mon Sep 17 00:00:00 2001 From: Deepak Srivastava Date: Thu, 28 Mar 2013 14:17:58 +0530 Subject: [PATCH] CRM-12215 --- CRM/Mailing/Form/Test.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CRM/Mailing/Form/Test.php b/CRM/Mailing/Form/Test.php index 88793cca9a..664ecfaceb 100644 --- a/CRM/Mailing/Form/Test.php +++ b/CRM/Mailing/Form/Test.php @@ -179,7 +179,7 @@ class CRM_Mailing_Form_Test extends CRM_Core_Form { * @return boolean true on succesful SMTP handoff * @access public */ - static function &testMail($testParams, $files, $self) { + static function testMail($testParams, $files, $self) { $error = NULL; $urlString = 'civicrm/mailing/send'; @@ -260,6 +260,14 @@ class CRM_Mailing_Form_Test extends CRM_Core_Form { } } + if (CRM_Utils_Array::value('_qf_Test_next', $testParams) && + $self->get('count') <= 0) { + return array( + '_qf_default' => + ts("You can not schedule or send this mailing because there are currently no recipients selected. Click 'Previous' to return to the Select Recipients step, OR click 'Save & Continue Later'."), + ); + } + if (CRM_Utils_Array::value('_qf_Import_refresh', $_POST) || CRM_Utils_Array::value('_qf_Test_next', $testParams) || !CRM_Utils_Array::value('sendtest', $testParams) -- 2.25.1