cancel
Showing results for 
Search instead for 
Did you mean: 

Mail

Swetha__Devaram
Level 4
I am using the MS Outlook email VBO to send out emails. When I try to insert message as a test value, it if not formatted right. The whole message is send in a single line. Does anyone else have this issue? I am using BP Version 6.4.

Thank You.

------------------------------
Swetha Devaram
RPA Developer
Health Markets
America/Chicago
------------------------------
6 REPLIES 6

AmiBarrett
Level 12

Try replacing all of your new line characters in your string with NewLine(). For example:

Before:
"This is a test.
It uses multiple lines."

After:
"This is a test."&NewLine()&"It uses multiple lines."



------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------

Hi Ami,

I used this: [Message]&NewLine()&[Message1]

It did not work. The message is coming in the same line.

------------------------------
Swetha Devaram
RPA Developer
Health Markets
America/Chicago
------------------------------

I just opened it up. Looks like this object is defaulting to using mail.HTMLBody instead of mail.Body when it compiles the message. So, add <br/> to the end of your string for each new line.

Before:
[Message] = "This is a test."
[Message1] = "It uses multiple lines."
Result = "This is a test.It uses multiple lines."

After:
[Message] = "This is a test.<br/><br/>"
[Message1] = "It uses multiple lines."
Result = "This is a test.

It uses multiple lines."

------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------

david.l.morris
Level 15
What we ended up doing is creating a wrapper object around the MS Outlook VBO that provides the same functionality (same actions) as the original. All our calls go to the wrapper object but in that wrapper object, it does things like checking for whether HTML is set to True/False, and if True then it does replace Replace([Body],NewLine(),"<br/>") to get the same result as Ami pointed out.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

It worked. Thanks a lot.

------------------------------
Swetha Devaram
RPA Developer
Health Markets
America/Chicago
------------------------------

Fair. In our version, it checks for the same kind of flag, but it internally designates if it calls mail.Body or mail.HTMLBody.

------------------------------
Ami Barrett
Lead RPA Software Developer
Solai & Cameron
America/Chicago
------------------------------