How to add line break from a list in an email html body

Question:

I have a list where I append the item from the list into the email body. As I display the email turns into like this.

Hi,

item1
item2

I wanted something like this. not sure how to implement this.

item1
item2

import win32com.client
mail = outlook.CreateItem(0)
mail.Sender = Sender
mail.Subject = "List"
mail.GetInspector`

index = mail.HTMLbody.find('>', mail.HTMLbody.find('<body')) 
lists= 'n'.join(str(serv)  for serv in servers)
message = 'Hi,''<br>''<br>' ' Please help check the names below:' + '<br>' '<br>' + lists
mail.HTMLbody = mail.HTMLbody[:index + 1] + message + mail.HTMLbody[index + 1:] 
mail.Display()
Asked By: Veck

||

Answers:

n in not <br/>. Or even better, use <li>.

Answered By: ctrl-alt-delor
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.