def send_user_name_change_notification_email(licence): email = UserNameChangeNotificationEmail() url = host_reverse('wl_applications:reissue_licence', args=(licence.pk, )) context = {'licence': licence, 'url': url} email.send(licence.issuer.email, context=context)
def send_licence_renewal_email_notification(licence): email = LicenceRenewalNotificationEmail() url = host_reverse('wl_home') context = {'url': url, 'licence': licence} return email.send(licence.profile.email, context=context) is not None
def send_user_name_change_notification_email(licence): email = UserNameChangeNotificationEmail() url = host_reverse('wl_applications:reissue_licence', args=(licence.pk,)) context = { 'licence': licence, 'url': url } email.send(licence.issuer.email, context=context)
def send_licence_renewal_email_notification(licence): email = LicenceRenewalNotificationEmail() url = host_reverse('wl_home') context = { 'url': url, 'licence': licence } return email.send(licence.profile.email, context=context) is not None
def send_return_overdue_email_notification(ret): email = ReturnOverdueNotificationEmail() url = host_reverse('wl_returns:enter_return', args=(ret.pk, )) context = {'url': url, 'return': ret} if ret.proxy_customer is not None: recipient_email = ret.proxy_customer.email else: recipient_email = ret.licence.profile.email msg = email.send(recipient_email, context=context) _log_email(msg, ret, sender=None)
def send_assessment_reminder_email(assessment, request=None): application = assessment.application email = ApplicationAssessmentReminderEmail(application) if request is not None: url = request.build_absolute_uri( reverse('wl_applications:enter_conditions_assessor', args=(application.pk, assessment.pk))) else: url = host_reverse('wl_applications:enter_conditions_assessor', args=(application.pk, assessment.pk)) context = {'assessor': assessment.assessor_group, 'url': url} msg = email.send(assessment.assessor_group.email, context=context) sender = request.user if request is not None else None _log_email(msg, application=application, sender=sender)
def send_assessment_reminder_email(assessment, request=None): application = assessment.application email = ApplicationAssessmentReminderEmail(application) if request is not None: url = request.build_absolute_uri( reverse('wl_applications:enter_conditions_assessor', args=(application.pk, assessment.pk)) ) else: url = host_reverse('wl_applications:enter_conditions_assessor', args=(application.pk, assessment.pk)) context = { 'assessor': assessment.assessor_group, 'url': url } msg = email.send(assessment.assessor_group.email, context=context) sender = request.user if request is not None else None _log_email(msg, application=application, sender=sender)