How to send an email with style in Python3?
问题 I am sending emails from a Python3 script (using smtplib ). By now, I am always receiving the messages in Gmail accounts. But the problem is I am not able to show CSS styles, in spite of being inline. Besides, even this simple message cannot be sent: title = 'My title' msg_content = '<h2>{title}: <font color="green">OK</font></h2>\n'.format(title=title) However, if I remove the two points just after {title}, it works. And if I remove the \n at the end it will not work again. Why? How can I