# -*- coding: utf-8 -*- # from django.conf import settings from django.utils.translation import ugettext as _ from common.utils import get_logger, reverse from common.tasks import send_mail_async logger = get_logger(__name__) def send_new_ticket_mail_to_assignees(ticket, assignees): recipient_list = [user.email for user in assignees] user = ticket.user if not recipient_list: logger.error("Ticket not has assignees: {}".format(ticket.id)) return subject = '{}: {}'.format(_("New ticket"), ticket.title) detail_url = reverse('tickets:ticket-detail', kwargs={'pk': ticket.id}, external=True) message = _("""
Your has a new ticket
Your ticket has been replay