How to write notepad content in same format as notepad in email body?

I want same structure as of notepad in my email body but it’s coming in same line in email body
FYI, html is checked in send mail activity
also, the content is varying every time

for e.g. notepad contains
a
b
c
d

i want same to be written in email

but its coming like a b c d in email body.

Hi @anjasing ,

Noticing the line breaks are not noticed. We can check by performing a replace operation and try to replace the NewLine with NewLine + <br> tags such that line breaks are identified in the Email Body as well.

Let’s say emailBody is the variable that contains the email body, then you can try the below :

emailBody.Replace(Environment.Newline,Environment.Newline+"<br>"+Environment.NewLine)

So, the modified data should look like something of the below in order for the data to be properly represented in mail body :
image

You could also surround your text with the pre tag to display the text as is.

<pre>
a
b
c
d
</pre>
2 Likes

Thank you so much. :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.