python sending mail email.message read textfile to body
I have a following python script that sends email when a linux machine restarts. It works but a tiny modification is needed. I need to read a log file and include the contents as body in the mail….not as an attachment. A lot of suggestions show only how to implement attachments of files csv, excel and jpg. I need to read textfile to body of the email. My code is:
python sending mail email.message read textfile to body
I have a following python script that sends email when a linux machine restarts. It works but a tiny modification is needed. I need to read a log file and include the contents as body in the mail….not as an attachment. A lot of suggestions show only how to implement attachments of files csv, excel and jpg. I need to read textfile to body of the email. My code is:
python sending mail email.message read textfile to body
I have a following python script that sends email when a linux machine restarts. It works but a tiny modification is needed. I need to read a log file and include the contents as body in the mail….not as an attachment. A lot of suggestions show only how to implement attachments of files csv, excel and jpg. I need to read textfile to body of the email. My code is: