user2439278
user2439278

Reputation: 1224

How to format Body of Jenkins emal which is taken from text file

I have created a jenkins job in which it will send the mail notification and I tried to embed the content of text file to body of email.

<b><font color="black">BUILD :</font> <font color="green">$PROJECT_NAME - $BUILD_STATUS </font> </b> <BR>
<BR>
<BR>

<div style="padding-left: 30px; padding-bottom: 15px;">
${FILE,path="gitlog.txt"}
</div>

<BR>
<BR>
<BR>

-BAT DevOps Team <BR>
<BR>_____________________________________________________________________<BR>

<font color="#808080">Note: This is a System Generated Mail. We request you not to reply to this message.</font><BR>
<BR>
<BR>

The Output of Jenkins mail is :Jenkins Mail Output

output of the mail is not in readable format. How to format?

How to use Groovy script to achieve this?

Upvotes: 1

Views: 2566

Answers (1)

Mike W
Mike W

Reputation: 3932

Try wrapping the content in pre tags

<pre>content</pre>

Upvotes: 1

Related Questions