Thanks for the replies. 
I have used HTML syntax and it worked:-

 <p> <a href='C:\\Other\\Data'>Imp List</a> </p>

However, I have one more question if I may. I need to grab a file name from 
the workspace. The first part of file is static and second part is dynamic. 
So, I need to find this file, get the full name
and pass it in the email body. 
Eg. File name - importlist_20030207 102020 (importlist is static and the 
rest is dynamic)
So, I need to get the above file name from workspace and send it in the 
path below:-
eg.   <p> <a href='C:\\Other\\Data'>Imp List\\*importlist_20030207 
102020.csv*</a> </p>

Can someone tell me how to do it?

On Monday, February 6, 2023 at 4:11:21 PM UTC slide wrote:

> Also, you will need to use a file:// link, not just the path. Be aware 
> though that unless everyone is running from the same C: drive mount, then 
> your link won't work at all for people clicking on it from their account.
>
> On Mon, Feb 6, 2023 at 9:05 AM Ivan Fernandez Calvo <[email protected]> 
> wrote:
>
>> Two things here, one the whole body must be and HTML page to be sent as 
>> HTML, and you need the email ext plugin installed, check the documentation 
>> of the plugin for more details
>>
>> https://plugins.jenkins.io/email-ext/
>> El lunes, 6 de febrero de 2023 a las 15:50:22 UTC+1, 
>> [email protected] escribió:
>>
>>> Can anyone tell me how to add a link to a file location in the email 
>>> body?
>>> I have the below email body and I want to send the highlighted/bold 
>>> bit( <a href=C:\\abc\\xyz\\>) as a link in  the email body after every run, 
>>> so, that users can click on the link from email to be take to the location, 
>>> but it doesn't work. .:-
>>>
>>> emailext attachLog: true, attachmentsPattern: 'target',
>>>                 subject: "Jenkins Build Report 
>>>  ${currentBuild.currentResult}: Job ${env.JOB_NAME} build 
>>> ${env.BUILD_NUMBER}",
>>>                 body: "${currentBuild.currentResult}: Job 
>>> ${env.JOB_NAME} \n Link: ${env.BUILD_URL} \n Drop folders can be found at
>>>                 *<a href=C:\\abc\\xyz\\>*",
>>>                   mimeType: 'text/html',
>>>                 to: testEmailGroup
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/9df81503-fa0b-4fff-a9bb-9f9d09cfe0b8n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/9df81503-fa0b-4fff-a9bb-9f9d09cfe0b8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Website: http://earl-of-code.com
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/7f602169-d58d-4f03-8144-565305f164ban%40googlegroups.com.

Reply via email to