#291 Don't send email if all email fields are empty
This commit is contained in:
parent
03de74dea7
commit
4e8e072924
@ -341,8 +341,11 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array(),$
|
|||||||
{
|
{
|
||||||
global $hesk_settings, $hesklang, $modsForHesk_settings, $ticket;
|
global $hesk_settings, $hesklang, $modsForHesk_settings, $ticket;
|
||||||
|
|
||||||
// Demo mode
|
// Are we in demo mode or are all email fields blank? If so, don't send an email.
|
||||||
if ( defined('HESK_DEMO') )
|
if ( defined('HESK_DEMO')
|
||||||
|
|| (($to == NULL || $to == '')
|
||||||
|
&& ($cc == NULL || count($cc) == 0)
|
||||||
|
&& ($bcc == NULL || count($bcc) == 0)))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user