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
Try:
msg['Subject'] = "Auto Hella Restart Report " + sys.argv[1]
The + operator is overridden in python to concatenate strings.
+