def send_via_ses(subject, body, targets, **kwargs):
    """
    Attempts to deliver email notification via SES service.
    :param subject:
    :param body:
    :param targets:
    :return:
    """
    email_tags = kwargs.get("email_tags")
    if not email_tags:
        email_tags = {}
    email_tags["subject"] = subject
    email_tags["targets"] = targets

    ses_region = current_app.config.get("LEMUR_SES_REGION", "us-east-1")
    client = boto3.client("ses", region_name=ses_region)
    source_arn = current_app.config.get("LEMUR_SES_SOURCE_ARN")
    args = {
        "Source": current_app.config.get("LEMUR_EMAIL"),
        "Destination": {"ToAddresses": targets},
        "Message": {
            "Subject": {"Data": subject, "Charset": "UTF-8"},
            "Body": {"Html": {"Data": body, "Charset": "UTF-8"}},
        },
    }
    if source_arn:
        args["SourceArn"] = source_arn
    response = client.send_email(**args)
    try:
        # logging information about the email (particularly the message ID) allows reconcilitation with SES bounce notifications
        message_id = response["MessageId"]
        email_tags["ses_message_id"] = message_id
        current_app.logger.info(f"Sent SES email: {message_id}", extra={"SES-Email": email_tags})
    except Exception:
        current_app.logger.error("Unable to log message ID of sent SES email", extra={"SES-Email": email_tags},
                                 exc_info=True)
        capture_exception()

    Attempts to deliver email notification via SES service.
    :param subject:
    :param body:
    :param targets:
    :return:
    
lemur/plugins/lemur_email/plugin.py