How to add hyperlink to send outlook mail message

I want to add hyperlink to the link which we will get from the variable in UiPath
here is the html code for the reference

<!DOCTYPE html><head><title>UIPATH test email</title></head><body><p>Hi,<br/>Hi this is Test email from UIPATH<br/><a href=Link>Click here</a><br/><br/><p></body>

where Link is the variable which get the value from the code
Consider Link = https://forum.uipath.com
Can anyone help me out with writing the html code for the same??

@Kunal_Jain

Say html string is stored in a string str

Then str.replace(“Link”,yourlinkvariable)

Cheers

I have to pass Link variable in html code only

@Kunal_Jain

Either write a value like link in html and then use replace.

Else if you want to directly write then use like below

"<!DOCTYPE html><head><title>UIPATH test email</title></head><body><p>Hi,<br/>Hi this is Test email from UIPATH<br/><a href=""" + Linkvar + """>Click here</a><br/><br/><p></body>"

Cheers

Hey @Kunal_Jain ,

As you are having the email body in a string variable so you can make some static keyword in place if link for example {Hyperlink}, and later on you can store the link in some other variable and replace that static keyword from the mailbody with the link variable.
EmailBody.Replace(“{Hyperlink}”,varLink)

Thanks,
Sanjit

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.