Your invoice is attached.
", "attachments": [sendpier_attachment(path, "application/pdf")], }, ) print(raw) if status != 202: # 413 message_too_large means the whole message went over 25 MB; send # big files as a download link instead. 422 attachment_type_blocked # means the file type would never reach an inbox anyway -- the last # extension counts, so invoice.pdf.exe is an .exe. sys.exit("request failed with HTTP {}".format(status)) for message in (body or {}).get("data", []): print("queued {} for {}".format(message.get("id"), message.get("to")), file=sys.stderr) if __name__ == "__main__": main()