diff --git a/send_report.py b/send_report.py index 8fe593f..3967efa 100755 --- a/send_report.py +++ b/send_report.py @@ -14,7 +14,7 @@ def file_to_html_str(path): with open(path, 'r') as fp: content = fp.read().replace('\n','
') - return content + return '
' + content + '
' def add_attachment(msg, f): with open(f, "rb") as fil: @@ -41,7 +41,7 @@ def main(): directory = os.path.abspath(args.dir) hostname = socket.gethostname() - file_location = f'{hostname}:{directory}' + file_location = f'{directory} at {hostname}' subject = args.subject if args.subject else f'Summary for {file_location}' usermail = subprocess.run(['git', 'config', 'user.email'], stdout=subprocess.PIPE).stdout.decode('utf-8').strip() sender = args.sender if args.sender else usermail @@ -85,11 +85,11 @@ def main(): # Point out file location - all_body_content += '

File Location

' - all_body_content += f'{file_location}
' + all_body_content += '

file location

' + all_body_content += f'
{file_location}
' # Attach body - msg.attach(MIMEText(all_body_content, 'html')) + msg.attach(MIMEText(all_body_content, 'html', 'utf-8')) # Now send or store the message if args.output: