.
This commit is contained in:
@ -26,7 +26,7 @@ msg["Subject"] = subject
|
|||||||
# Add body to email
|
# Add body to email
|
||||||
body = "This is an example of how you can send a boarding pass in attachment with Python"
|
body = "This is an example of how you can send a boarding pass in attachment with Python"
|
||||||
msg.attach(MIMEText(body, "plain"))
|
msg.attach(MIMEText(body, "plain"))
|
||||||
filename = "/var/tmp/keys.zip"
|
filename = "/var/tmp/keys.tar"
|
||||||
# Open PDF file in binary mode
|
# Open PDF file in binary mode
|
||||||
# We assume that the file is in the directory where you run your Python script from
|
# We assume that the file is in the directory where you run your Python script from
|
||||||
with open(filename, "rb") as attachment:
|
with open(filename, "rb") as attachment:
|
||||||
|
|||||||
@ -29,9 +29,9 @@ then
|
|||||||
echo "$0: email the below to requestor"
|
echo "$0: email the below to requestor"
|
||||||
echo "--------------------------------"
|
echo "--------------------------------"
|
||||||
cat ${KEYSTORE}/*.pub |sort | uniq
|
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
|
python3 ${BASE}/shared/attmail.py
|
||||||
rm -f /var/tmp/keys.zip
|
rm -f /var/tmp/keys.tar
|
||||||
else
|
else
|
||||||
echo "ERROR: keystore not found"
|
echo "ERROR: keystore not found"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user