How do I attach a PDF sitting in the base directory of my Appengine app to an email message?
What should message.attachments look like?
How do I attach a PDF sitting in the base directory of my Appengine
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As per the documentation, the attachments field is a list of tuples in which the first element is the filename and the second the byte string representing the file. So you just need to read the pdf:
this assumes that your pdf and the python file are in the same folder. And then