lemur_email Package

lemur_email Package

plugin Module

class lemur.plugins.lemur_email.plugin.EmailNotificationPlugin(*args, **kwargs)

Bases: lemur.plugins.bases.notification.ExpirationNotificationPlugin

additional_options = [{'name': 'recipients', 'type': 'str', 'required': True, 'validation': '([-!#-\'*+/-9=?A-Z^-~]+(\\.[-!#-\'*+/-9=?A-Z^-~]+)*|\\"([]!#-[^-~ \\t]|(\\\\[\\t -~]))+\\")@([-!#-\'*+/-9=?A-Z^-~]+(\\.[-!#-\'*+/-9=?A-Z^-~]+)*|\\[[\\t -Z^-~]*])', 'helpMessage': 'Comma delimited list of email addresses'}]
author = 'Kevin Glisson'
author_url = 'https://github.com/netflix/lemur'
description = 'Sends expiration email notifications'
static get_recipients(options, additional_recipients, **kwargs)

Given a set of options (which should include configured recipient info), returns the parsed list of recipients from those options plus the additional recipients specified. The returned value has no duplicates.

For any notification types where recipients can’t be dynamically modified, this returns only the additional recipients.

static send(notification_type, message, targets, options, **kwargs)
slug = 'email-notification'
title = 'Email'
version = 'unknown'
lemur.plugins.lemur_email.plugin.render_html(template_name, options, certificates)

Renders the html for our email notification.

  • template_name

  • options

  • certificates


lemur.plugins.lemur_email.plugin.send_via_ses(subject, body, targets, **kwargs)

Attempts to deliver email notification via SES service. :param subject: :param body: :param targets: :return:

lemur.plugins.lemur_email.plugin.send_via_smtp(subject, body, targets)

Attempts to deliver email notification via SMTP.

  • subject

  • body

  • targets