Jenkins has a plugin to send emails, below is a simple example on how you would call it.
It is important to note that the “body” needs to be formatted in HTML so it will appear just like you expect it when you open your email.
I was saving a bunch of text into a variable and using it to log into the console and also using it for the email body. This got me into trouble when my emails where looking ugly and I realized that “/n” does not translate into a new line in an email message.
Here are some HTML code snippets that will work with the plugin: