Skip to content

Attached local PDF files #110

@walmins

Description

@walmins

Hello,
I try to send local PDF files but isn't work,

          with open(src_pdf, 'rb') as f:
            pdf_file = f.read()
          attachments = [
            ("my_pdf_file.pdf", pdf_file, 'application/pdf')
            ]
          pm = PMMail(
            to=user_mail, 
            bcc=pmBCC,
            sender=pmSender,
            template_id=email_template_id,
            template_model=template_model,
            api_key=pmApiKey,
            attachments=attachments,
            tag=pmTag)
          pm.send()

do you know what is wrong?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions