workaround for bash sending file

pull/16/head
TheDragonkeeper 2017-11-04 16:34:35 +00:00 committed by GitHub
parent d9d1117d82
commit 95c54d2739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -11,9 +11,13 @@ import sys
sys.path.append("/root/extensions")
from sendemail import send_mail
send_mail(sys.argv[1], sys.argv[2],
if len(sys.argv) > 8:
send_mail(sys.argv[1], sys.argv[2],
sys.argv[3],
sys.argv[4],
server=sys.argv[5], username=sys.argv[6], password=sys.argv[7], files=[sys.argv[8]])
else:
send_mail(sys.argv[1], sys.argv[2],
sys.argv[3],
sys.argv[4],
# files=sys.argv[8],
server=sys.argv[5], username=sys.argv[6], password=sys.argv[7])
)