02-19-2013 08:26 AM - edited 03-14-2019 11:15 AM
Hi Community,
i would like to insert multiple lines into the body of the email. I am searching for a description or documentation. But i cannot find something.
Please answer with an example. Maybe its possible to insert a document? A little example would be nice.
UCCX: 8.5.1 (SU4)
Solved! Go to Solution.
02-19-2013 11:20 PM
Hi,
what do you mean by multiple lines? Like a large text? And you want to separate paragraphs?
Well, on one hand, it's easy. I never tried this on UCCX Standard or Enhanced, only on Premium, but basically, this is how it works: create a new String variable, name it newLine or something similar. Its value would be System.getProperty("line.separator"). Now, provided you have your "paragraphs" in String variables, you can do this: Set bodyString = paragraphString1 + newLine + paragraphString2.
Or, if you want to do this the proper way, use StringBuffers instead of just concatenating Strings. Like this:
Set bodyString = {StringBuffer buffer = new StringBuffer(100); buffer.append(paragraphString1); buffer.append(newLine); buffer.append(paragraphString2); return buffer.toString();}
Here's a screenshot:
G.
02-19-2013 11:20 PM
Hi,
what do you mean by multiple lines? Like a large text? And you want to separate paragraphs?
Well, on one hand, it's easy. I never tried this on UCCX Standard or Enhanced, only on Premium, but basically, this is how it works: create a new String variable, name it newLine or something similar. Its value would be System.getProperty("line.separator"). Now, provided you have your "paragraphs" in String variables, you can do this: Set bodyString = paragraphString1 + newLine + paragraphString2.
Or, if you want to do this the proper way, use StringBuffers instead of just concatenating Strings. Like this:
Set bodyString = {StringBuffer buffer = new StringBuffer(100); buffer.append(paragraphString1); buffer.append(newLine); buffer.append(paragraphString2); return buffer.toString();}
Here's a screenshot:
G.
02-20-2013 02:55 AM
Hi Gergely,
this is absolutly where i am searching for. Many thanks for your explanation, this was very helpful for me.
I simplified the construction of the variable "emailbody" like the following pic.
The important thing is the function "System.getProperty("line.separator")" to insert a Carriage Return.
02-20-2013 03:13 AM
Hi,
glad it worked out.
If you want even more granular control, like HTML email, check recipe 3 here:
https://supportforums.cisco.com/docs/DOC-24150
G.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide