IRPA 2.0 send email. How to use line brake?
source link: https://answers.sap.com/questions/13481674/irpa-20-send-email-how-to-use-line-brake.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I'm trying to send email with body text = "test\ntest'. I expect to have line brake as it is in Desktop Studio.
This is an example from Desktop Studio.
ctx.outlook.mail.create({To:"[email protected]", Subject:"PO created", Body : "Hi\nThis is the body of the email"})
But in cloud version I've got text in email without line brake. Do I need to use another method or it's a bug in cloud studio?
did you tried to use </br> instead of \n?
Lucie Fiedlerova, thanks for your reply.
I tried to use test1</br>test2 and test1/brtest2 in field "body" of Send Email (outlook). No, It does not work.
Hi, I wonder if you have been successfull or not? I am trying to solve similar issue. I tried \n or use <BR> also with <HTML> and <BODY> in expression editor but it does not seem to work. Thank you.
Hi Jaroslav,
<BR> is acting as a line break for me. I used it in a dialog and it worked(I used this same text as a sample :))
Expression
Dialog
Best Regards,
Prasanth
It's seems to be that impossible to use line brake in simple text format.
So I changed format of letter to HTML. Sure, It's more complex to use this format but you can set any font, size, color or anything else.
I used custom script where I put HTML into variable. HTML code I got from browser where I opeped letter in HTML format.
Here is an example:
var body_text = '<p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style=\'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;';body_text += 'margin-left:70.8pt\'><span style=\'font-size:10.5pt;font-family:"Arial",sans-serif;color:#3B3B3B;mso-fareast-language: RU\'>';body_text += ' Place your text here';body_text += '<p class=MsoNormal style=\'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;';body_text += 'margin-left:70.8pt\'><span style=\'font-size:10.5pt;font-family:"Arial",sans-serif;';body_text += 'color:#3B3B3B;mso-fareast-language: RU\'>';Hi Sergei Kissler,
To be able to use line breaks within Body of Send Email (Outlook), I suggest you to use the below format as an example:
"<html><body><p>Hello " + Step0.candidate.Name + ",<br><br><p>We are glad to offer you the position " + Step0.candidate.Position + ".<br>Please find the offer letter enclosed.<br><p>Many Thanks,<br><br>Best Regards,<br>SAP Talent Acquisition Team</body></html>"
This will allow you to use line breaks.
Hope this helps!
Best Regards,
Eshita
I used the format that you put as an example body-in-activity.png, but the text in body didn't put line breaksbody-in-outlook.png.
What did I do wrong?
Best, Carina.-
Hi Carina Sorrocher / All,
FYI using newline character \n worked flawlessly for me..
** Note:
- I always maintained a space before \n (not sure if this is mandatory, but please give it a try).
- had set isHtmlBody to false
Hope below screengrab helps
Regards,
Vishal Rathi
Before answering
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that your answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK