Keeping the structure of text for an email

Hello,

I am trying to send an email using a text file to store the body of the email. However, when reading the text file (Using the readTextFile activity) it loses all it’s structure, I have tried using string.replace to substitute a symbol I put at the end of each line for vbNewLine and I tried the same with environment.Newline instead but both options do nothing. Is there an easy way to keep the structure of the text message?

Thank you

Hi @deguy42

Try Using HTML Format!

In the mail properties Check the Option is body HTML!

Regards

1 Like

when email is sent as HTML the Linebreak is a <br>

Hello,

Thanks for getting back to me so fast, I am using the Reply to outlook message activity and can’t see an option for Body is HTML, is there a way to set the text as HTML String?

1 Like

I am trying not to use this activity as it requires an outlook card and I’ve had issues using that in the past, is there anyway to do it using the reply to outlook activity?

then body type is given by email which you do answer
Linebreakers are:
HTML: <br>
text: e.g. Environment.NewLine

with: myMailVar.IsBodyHtml we can check which scenario we have to handle

1 Like

Using string.replace with “< br >” worked perfectly! Thanks

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