Closes #99 Only attempt to send email if ticket's email is not blank

This commit is contained in:
Mike Koch 2014-12-31 15:02:29 -05:00
parent dfb07b979c
commit a762682ddb

View File

@ -94,8 +94,12 @@ if ($statusRow['IsClosed']) // Closed
// Notify customer // Notify customer
require(HESK_PATH . 'inc/email_functions.inc.php'); require(HESK_PATH . 'inc/email_functions.inc.php');
if (!empty($ticket['email']))
{
hesk_notifyCustomer('ticket_closed'); hesk_notifyCustomer('ticket_closed');
} }
}
elseif ($statusRow['ID'] != 0) //Ticket is still open, but not new elseif ($statusRow['ID'] != 0) //Ticket is still open, but not new
{ {
$action = sprintf($hesklang['tsst'],$status_options[$status]); $action = sprintf($hesklang['tsst'],$status_options[$status]);