diff --git a/cron_mail_queue.php b/cron_mail_queue.php index fd6782a1..de6e4037 100644 --- a/cron_mail_queue.php +++ b/cron_mail_queue.php @@ -131,6 +131,7 @@ if (mysqli_num_rows($sql_failed_queue) > 0) { $email_content = $row['email_content']; $email_queued_at = $row['email_queued_at']; $email_sent_at = $row['email_sent_at']; + $email_ics_str = $row['email_cal_str']; // Increment the attempts $email_attempts = intval($row['email_attempts']) + 1; @@ -155,7 +156,8 @@ if (mysqli_num_rows($sql_failed_queue) > 0) { $email_recipient, $email_recipient_name, $email_subject, - $email_content + $email_content, + $email_ics_str ); if ($mail !== true) { diff --git a/functions.php b/functions.php index f69cf424..ceb39012 100644 --- a/functions.php +++ b/functions.php @@ -1053,8 +1053,6 @@ function createiCalStr($datetime, $title, $description, $location) { // Todo: add organizer details // $event->addNode(new ZCiCalDataNode("ORGANIZER;CN=Organizer Name:MAILTO:organizer@example.com")); - // Export the iCal object to a string - $ics_feed = $cal_event->export(); - - return $ics_feed; + // Return the iCal string + return $cal_event->export(); } diff --git a/post/ticket.php b/post/ticket.php index be607124..eb3272e8 100644 --- a/post/ticket.php +++ b/post/ticket.php @@ -751,7 +751,7 @@ if (isset($_POST['bulk_ticket_reply'])) { // Get Contact Details $sql = mysqli_query( $mysqli, - "SELECT contact_name, contact_email, ticket_created_by, ticket_assigned_to + "SELECT contact_name, contact_email, ticket_created_by, ticket_assigned_to FROM tickets LEFT JOIN contacts ON ticket_contact_id = contact_id WHERE ticket_id = $ticket_id" @@ -1186,7 +1186,7 @@ if (isset($_POST['add_invoice_from_ticket'])) { $sql = mysqli_query( $mysqli, - "SELECT * FROM tickets + "SELECT * FROM tickets LEFT JOIN clients ON ticket_client_id = client_id LEFT JOIN contacts ON ticket_contact_id = contact_id LEFT JOIN assets ON ticket_asset_id = asset_id diff --git a/ticket_edit_schedule_modal.php b/ticket_edit_schedule_modal.php index 85bfa2cc..fec053ef 100644 --- a/ticket_edit_schedule_modal.php +++ b/ticket_edit_schedule_modal.php @@ -44,4 +44,4 @@ - \ No newline at end of file +