cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Read .txt file with HTML code for email body to send an email

NickE
New Contributor II

Hello,

I am trying to configure an email sender snap which has reads the HTML code for the body of the email downstream. Currently, the HTML is in a .txt file in the groundplex, therefore I am using file reader to pick up the file but I do not know how to convert binary and then feed into the email sender snap.

Thank you very much for your help

9 REPLIES 9

NickE
New Contributor II

Hi Spiro,

Thank you very much. I managed to get this working (there was an issue upsteam which wasnโ€™t pulling through the targets on the mapper).
I have now encountered an issue that the output of the binary to document has replaced the tabs and newlines with \t and \n. I am trying to use the csv formatter and parser to recreate the data as it should be but I am stuck.
Many thanks

SpiroTaleski
Valued Contributor

@NickE

Can you attach the sample data that you are getting as an output from Binary to Document Snap?

Regards,
Spiro Taleski

NickE
New Contributor II

Hi Spiro,

Ah amazing, thank you very much.
Example is attached.
Thanks

Nick
Binary_to Document output0 (7).txt (1.8 KB)

SpiroTaleski
Valued Contributor

@NickE

Try with replacing the newlines(\n) with <br> and tabs(\n) with &#9;

ex: $content.replaceAll ("\r\n","<br>").replaceAll ("\t","&#9;")

Regards,
Spiro Taleski

NickE
New Contributor II

Thank you very much!