diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index df581d96fdc..1d7360b44a7 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1732,6 +1732,7 @@ class Ticket extends CommonObject $error = 0; $now = dol_now(); + $send_email = GETPOST('send_email','int'); // Clean parameters if (isset($this->fk_track_id)) { @@ -1752,6 +1753,9 @@ class Ticket extends CommonObject if ($this->private) { $actioncomm->code = 'TICKET_MSG_PRIVATE'; } + if ($send_email > 0){ + $actioncomm->type_code = 'AC_EMAIL'; + } $actioncomm->socid = $this->socid; $actioncomm->label = $this->subject; $actioncomm->note_private = $this->message;