How to format an body of email?

Hi, In my code I have some couple of email generating to the user during the process. For every 6 months the email template keeps on changes and we should frequently change the content as suggested by the user. How can this be satisfied? If I copy and paste the content from the word to the mail, It displays the mail as an whole content without formatting it. I need an help in this case, that how can I get an formatted email. Thanks in advance.

Hi Rashmika,

you can keep changing mail body in config or in the excel sheet. whenever there is change you just need to change body in the excel.

If this solves your issue pls mark it as solution

Thanks

3 Likes

Hi @Rashmika_Barathan,

You can format the email body using html scripts and store it on config/assets.

I hope this will help you, Happy Automation!

Hello @Rashmika_Barathan,

You can keep the template as word or as html and change only this every 6 months, not the process.

I use html with images as input. First, i read it with “Read Text File” and i use this variable as input to body.
Also, i use RPA Brasil Mail Activities - RPA Component | UiPath Marketplace in order to send images as part of the HTML.

Thanks,
Nikos

Hi Nikos,

Is it possible to to share any sample file for a reference? It would be really helpful.
Thanks in Advance.

Hi Kalpesh,

My email includes bullet points and even Italics in between. Will Excel support all these?

Hi Aswin,

Is it possible to save an entire body of a mail as an asset? If so, can you explain it briefly or share some file for reference? Thanks in advance.

@Rashmika_Barathan

Yes, you can save html script as a text asset.

Please share a sample of the email message.

Thank you!

@Rashmika_Barathan

Please find the attached sample text file, just copy the text and save it in asset/config. Call the same to the email body in your project.

The output of the attached script will be:

bold text here

itallics here.

Please get back if you’ve any questions, Thank you!

html.txt (117 Bytes)

Of course!

This is the flow:
image

vStrHTML = your template file path - and the out of read text saved to "vStrEmailBody

The configuration of the email activity:
image

It’s simple. Maybe you don’t need the replace, i use it in order to pass variable from the flow to html.

Thank you, Let me try this out.

1 Like