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()
Answers:
n
in not <br/>
. Or even better, use <li>
.
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()
n
in not <br/>
. Or even better, use <li>
.