Ive downloaded plugin for jenkings to sending emails. What I have is 2 files:
ReleaseNotes.txt
config.properties
The first one contains release notes in plain text, the second one contains the same release notes as properties file. I can send them as attachment via this plug in, but I wish to add the content as mail content.
Option 1: Somehow add content of ReleaseNotes.txt to my mail
Option 2: Set new environmental variable from config.properties and add them to mail.
Esther one of the options will satisfy me, can you please help me with one of them? In your answer please not just send me link to plugin but actually help me and explain how to achieve it. I saw some plugins but I struggled using them.
With the Email Extension Plugin v2.61 you can just do
<pre>
${FILE, path="file_name.txt"}
</pre>
in the Default Content session and keep the format
You should be able to combine Environment Script plugin with Email-ext plugin to achieve the desired functionality.
Check the generate environment variable from script option in the build environment section.
Then create the script to read the file content, like this:
echo RELEASE_NOTES=$(cat ReleaseNotes.txt)
In the extended email notification configurations section, fill the default content field with your recently created variable $RELEASE_NOTES
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With