@@ -37,11 +37,16 @@ if __name__ == "__main__":
37
37
parser .add_option ("-t" , "--to" , help = "Optional to address to send to (default from your boto.cfg)" , action = "store" , default = None , dest = "to" )
38
38
parser .add_option ("-s" , "--subject" , help = "Optional Subject to send this report as" , action = "store" , default = "Report" , dest = "subject" )
39
39
parser .add_option ("-f" , "--file" , help = "Optionally, read from a file instead of STDIN" , action = "store" , default = None , dest = "file" )
40
+ parser .add_option ("--html" , help = "HTML Format the email" , action = "store_true" , default = False , dest = "html" )
41
+ parser .add_option ("--no-instance-id" , help = "If set, don't append the instance id" , action = "store_false" , default = True , dest = "append_instance_id" )
40
42
41
43
(options , args ) = parser .parse_args ()
42
44
if options .file :
43
45
body = open (options .file , 'r' ).read ()
44
46
else :
45
47
body = sys .stdin .read ()
46
48
47
- notify (options .subject , body = body , to_string = options .to )
49
+ if options .html :
50
+ notify (options .subject , html_body = body , to_string = options .to , append_instance_id = options .append_instance_id )
51
+ else :
52
+ notify (options .subject , body = body , to_string = options .to , append_instance_id = options .append_instance_id )
0 commit comments