pip install kpireport-sendgrid
Send the report as an email using SendGrid. This plugin utilizes SendGrid’s API, and you must generate an API key that has the “Mail Send” permission to authenticate and send the report.
Images or other attachments are by default embedded within the email, but you can optionally link them in as remote assets instead. Remote linking requires that the report additionally be placed somewhere accessible over the Internet, via, e.g., the Static file, S3, or SCP (secure copy) plugins.
This plugin utilizes
premailer for CSS inlining, which in turn
cssutils, which is licensed under LGPL 3.0. A copy of this
license is included in
LGPL-3.0.md in the plugin source.
- class kpireport_sendgrid.SendGridOutputDriver(report: kpireport.report.Report, **kwargs)¶
Email a report via SendGrid.
When testing, you can set a
SENDGRID_SANDBOX_ENABLED=1environment variable, which will only verify the mail payload on SendGrid, but will not actually send it.
the sender email address.
a list of target email addresses.
a SendGrid API key authorized to send mail on behalf of the sending address.