I am using Windows10 OS, Python 3.7.9 64-bit, I am send automated email in which the employee name alone must be in Bold, I tried the below code, but not getting proper output
e_name = "XXX"
msg = "Dear " + '\033[1m' + e_name + '\033[0m' + "\n\n"
Expected output: Dear XXX
In the terminal, it prints the bold text, but while receiving mail, I am getting like this. Please help on this
Also, I want to some items in the list with bullet points which are not manually printed using print statement, the values are in the list of in the dataframe, so I will be using for loop for iteration.
How to print those with bullets (. dot) preceeding the each items.. This also will be the part of the email message.
below is my code, inside for loop, where each item should be displayed with bullets and in bold text in the email.
message = row['employee_id'][i] + " -- " + row['employee_name'][i] + "\n\n"
also tried simple_colors package,below is the code, even for this method, in the terminal, I am getting correct output, but in the email getting the same Actual Output shown above
from simple_colors import *
message = black(row['employee_id'][i] + " -- " + row['employee_name'][i] + "\n\n", 'bold')
You can't make bold text unless your application is able to use Markdown or similar. However, to emphasise anyway, you could simply add an asterisk or two, i.e. **xxx**
You can, however, include a bullet as text. The Unicode is U+2022 or you can copy this: • (see also https://unicode-table.com/en/2022/ or the white bullet https://unicode-table.com/en/25E6/).