Send SMTP Email - new lines removed

Hello,
I’m using the “Send SMTP Mail Message” activity to send emails.

After sending, all line breaks in the email body are removed. The body text is loaded from an Excel-based config into a variable using (read range workbook) and then saved to dictionary.
When calling for the text in Body of SMTP acitivity I use: Convert.ToString(Config(“Body”))

How can I preserve line breaks in the sent email?

@miladek,

I would suggest to use IsBodyHtml and pass your email in HTML format. This is more reliable for formatting than the plain string text.

Could you explain me more how to use this “IsBodyHtml”, please? I don’t have experience with that. Here is screenshot of my activity.

@miladek

Just click on that Plus button and select Body as HTML

Ok, it works now. Thank you :slight_smile: I was already using this “Body as html” but when I switched it to “Body as text” it started to work. :sweat_smile:

1 Like

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