for my scenario I want to collect the content of emails and store it in a database.
It works fine, except that collected emails contain several line breaks ; I don’t know why because the email seems to only contain one line break in Outlook…
I can remove the line breaks, but I would like to keep one instead.
Here’s a little trick you might be able to use involving split() and join() methods, without using an additional module/operation.
You split up the text by {{newline}}, and if any are blank then the function removes them from the final array. Then, you use join() to put the lines back together, using {{newline}} as a separator.