I am getting error while sending the link attached in the mail

Hi,
I am getting the error while sending the link attached to the email.
While sending the mail it is giving error message as mentioned below
The Exception is System.TimeoutException: The operation has timed out. at UiPath.Mail.Activities.SendMailActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) at source UiPath.Mail.Activities

If we are sending the simple string or message it is sending it easily but creating this error while attaching a link to a hyperlink in the mail.

Hi @Kunal_Jain

You can put the link in the body using anchor tag as described below, with isBodyHTML property is checked

Capture

image
You are talking about this??
It is already checked and also href is used in body tag.
But than also it is creating problem.

can you also highlight what you are passing in Body.


"<span style='color:red;'>" +"**This is a system-generated email, please don’t reply** "+ "</span>"+"<br />"+
"<br />"+"Please find the Report in attached Link."+
"<!DOCTYPE html><head></head><body><p><a href=""" + Link + """>Scheduled Result</a><p></body>"+
"<span style='color:red;'>" +"**Disclaimer: The shared file is available read-only. You can download the file to your local computer to Edit the contents** "+ "</span>"+"<br />"+
"<br/>"+"Thanks,"+"<br />"+
"Bot"

where link is the variable containing the link

we would recommend to correct the HTML Structure
Do not have tags before the prolog:

But the same code is working for the development machine but creating problem in production machine.

@Kunal_Jain are you referring link here for attachment to email?

No
Just a simple link to the sharepoint.

Try to pass this in your body

"
<html>
   <body>
      <span style='color:red;'>**This is a system-generated email, please don’t reply** </span>
      <br />
      <br />Please find the Report In attached Link.
      <p><a href= "+Link+">Scheduled Result</a></p>
         <span style='color:red;'>**Disclaimer: The shared file is available read-only. You can download the file to your local computer to Edit the contents**</span><br />
         <br/>Thanks,<br />
         Bot
   </body>
</html>
"

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