PDF Attachments
Author: Marius Moldovan
The PDF Attachments Module allows for a reliable attachment of PDFs to emails using the Brevo API.
How it Works
- Receive PDF links: A list of PDF URLs is received
- Download PDFs: From every received URL a PDF is fetched
- Encode PDFs: The received PDFs are encoded into Base64
- Create Attachment Object: A Brevo Attachment Object is created from every encoded PDF
- Send Attachment: A List of all Attachment Objects is sent in the email
Classes and Functions
Function: process_attachments(pdf_links)
:
Params:
- pdf_links (
List[str]
): List of PDF URLs.
Returns:
List[SendSmtpEmailAttachment]
orNone
: List of attachment objects or None if no links are provided.