.
This commit is contained in:
@ -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:
|
||||
|
||||
@ -29,9 +29,9 @@ then
|
||||
echo "$0: email the below to requestor"
|
||||
echo "--------------------------------"
|
||||
cat ${KEYSTORE}/*.pub |sort | uniq
|
||||
zip /var/tmp/keys.zip ~/.mykeys/_*.pub
|
||||
tar -cvf /var/tmp/keys.tar ~/.mykeys/_*.pub
|
||||
python3 ${BASE}/shared/attmail.py
|
||||
rm -f /var/tmp/keys.zip
|
||||
rm -f /var/tmp/keys.tar
|
||||
else
|
||||
echo "ERROR: keystore not found"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user