SMTP

https://img.shields.io/pypi/v/kpireport-smtp
pip install kpireport-smtp

Note

This plugin utilizes premailer for CSS inlining, which in turn utilizes cssutils, which is licensed under LGPL 3.0. A copy of this license is included in LGPL-3.0.md in the plugin source.

API

class kpireport_smtp.SMTPOutputDriver(report: kpireport.report.Report, **kwargs)

Bases: kpireport.output.OutputDriver

Email a report’s contents via SMTP to one or more recipients.

email_from

From email address.

Type

str

email_to

Email addresses to send to.

Type

List[str]

smtp_host

SMTP server to relay mail through. Defaults to “localhost”.

Type

str

smtp_port

SMTP port to use. Defaults to 25.

Type

int

image_strategy

Strategy to use for including images in the mail contents. Two options are available:

  • embed: embed the image directly in the mail using Content-ID (RFC2392) linked resources. These should be compatible with most modern desktop and web mail clients.

  • remote: link the image to a remote resource. For this strategy to work, the image assets must exist on a server reachable via the public Internet (and not require authentication). Consider using the SMTP plugin in conjunction with e.g., the S3 or SCP plugins to accomplish this entirely within KPI reporter.

    Note

    No tracking information is included when rendering remote image URLs; if for some reason you need to track open rates, consider using the SendGrid plugin to send the report instead.

Type

str

image_remote_base_url

When using the “remote” image strategy, the base URL for the image assets. Image blobs generated by Views are placed in folders named after the View ID; this base URL should point to the root path for all of these folders.

Type

str

Changelog

0.0.1

Prelude

Initial commit.

New Features

  • Initial commit.