Is it possible for python to format the email sent to it?

I have a script that runs in the evening while it is running, it writes to a log file, the text it writes is also emailed to me as soon as the task completes. In some cases the task might fail, I want it to happen when I receive an email, the error line is in red and in bold.

So my question is, can Python format text be a specific font / color if a specific condition is met? if so, are there any good examples?

thank

+3


source to share


1 answer


I think you could just add html tags to your email and send it as HTML. However, it will change the content of your text file as it will write additional characters to change the style.



Example: Sending an HTML Email Address Using Python

+5


source







All Articles