3

IRPA 2.0 send email. How to use line brake?

 2 years ago
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.
neoserver,ios ssh client
Search Questions and Answers
Sep 13, 2021 at 03:33 PM

IRPA 2.0 send email. How to use line brake?

330 Views

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?

5 Answers
Sort by:
Sep 14, 2021 at 08:33 AM

did you tried to use </br> instead of \n?

1 comment
Sep 16, 2021 at 01:39 PM

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.

Nov 25, 2021 at 08:09 AM

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.

1 comment
Feb 16, 2022 at 06:19 AM

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

expression.png

Dialog

popup.png

Best Regards,

Prasanth

Attachments

expression.png (19.3 kB)
popup.png (19.2 kB)
Nov 25, 2021 at 08:30 AM

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\'>';
Feb 16, 2022 at 07:01 PM

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

1 comment
12 hours ago

Hi ESHITA MAHAJAN

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

newlinecharacter.png

Regards,

Vishal Rathi

Attachments

Know someone who can answer? Share a link to this

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.

Please provide a distinct answer and use the comment option for clarifying purposes.
10 characters required.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK