This commit is contained in:
2022-09-18 19:46:58 +01:00
parent 9f6a4d3847
commit 98948a1820
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ msg["Subject"] = subject
# Add body to email
body = "This is an example of how you can send a boarding pass in attachment with Python"
msg.attach(MIMEText(body, "plain"))
filename = "/var/tmp/keys.zip"
filename = "/var/tmp/keys.tar"
# Open PDF file in binary mode
# We assume that the file is in the directory where you run your Python script from
with open(filename, "rb") as attachment: