I want to include file name \'main.txt\' in the subject for that I am passing file name from command line. but getting error in doing so
python sample.py ma
I'm guessing that you meant to do this:
msg['Subject'] = "Auto Hella Restart Report " + sys.argv[1] # To concatenate strings in python, use ^