Cant seem to get this working, and yes i have searched the forums
im trying to send this :
<html>
<header><title>This is title</title></header>
<body>
Hello world
</body>
</html>
As the body of an email to the receiver should just see âHello worldâ
Ive tried :
Pasting it into the body, adding " "'s around it, adding âto.stringâ , made sure âishtmlâ was checked.
ive also tried assigning it to a STR variable but that didnât work either.
and finally i tried saving it as a .txt and a .htm file, then importing to a variable but that didnt work.
so any advice would be greatly appreciated as I want to send more advanced html emails in future.
update :
Ive managed to get this working when i save it as a .txt file then use a read text file activity to save it as a string variable, and then send that variable as the body of the mail.
but i really would prefer to do this within uipath so that in future I can populate emails with peoples names etc for other variables.
Ok ive manged to work it out!
basically UIpath expects everything to be a string, so you have to write HTML as a VB string lol
example of âhello Dave !â :
âAssign [name] = [ âDaveâ ]â
each line must be a valid VB string. You can return a line using âEnvironment.Newlineâ
"<html>" & Environment.Newline &
"<body>" & Environment.Newline &
"<p> Hello " + name.tostring + " !"" </p> " & Environment.Newline &
"</body>" & Environment.Newline &
"</html>"
When sent in an email the above will simply say
Hello Dave !
1 Like