Hello,
I am currently trying to compose a new Outlook email upon clicking a link from the Appian interface. I am unable to insert a line break in the body of the email. Any thoughts on how to resolve this issue ?
Thanks,
Sidd
{ a!richTextDisplayField( value: { a!richTextItem( text: "Click to send Email ", link: a!safeLink( uri: concat( "mailto://abc@xyz.com?subject=Test Email &cc=qwe@xyz.com &Body=", "Hello " & char( 10 ) & "user" ) ), size: "MEDIUM" ) } ) }
Discussion posts and replies are publicly visible
Hi, I know this is an old thread but need help on this topic from the community.
I am using mailto to open an email in Outlook with body pre-populated as well. However, I am not sure how I can introduce line breaks using a rich text editor to compose a body. Has someone tried this before?
Also, are there any character limitations when we use mailto?
Any text you want to put in that mailto URL needs to be URL encoded. Use the function urlwithparameters() to do that. Then your line breaks will be encoded correctly. Beware that there are certain limitations in the length of that URL.
Thanks Stefan!
The urlwithparameters() function worked for generating the proper url to be used in the safeLink(). However, it still could not get rid of the <div> and <br> tags, so I used striphtml() to achieve that.
The max char limit is 1274 as per my testing. I wish it was more!
local!url: urlwithparameters( concat("mailto:",ri!emailMessage.to), {"cc","subject","body"}, {ri!emailMessage.cc,ri!emailMessage.subject,striphtml(ri!emailMessage.body)} )