Notifications and Reporting
- Informing the team of status of jenkins jobs is an essential part.
- For this lab setup we would be using mailtrap which is a fake smtp server Refer Here.
- Create an account with your existing google account or Github account
- Setting up mailtrap

- These credentials will be configured in the jenkins
- Now Navigate to jenkins -> Manage Jenkins -> Configure System -> Email Notification

- Free style project

- Scripted Pipeline:
- Refer Here for the changes
- mail sent:

- Declarative Pipeline:
- Refer Here for the mail step
- Refer Here for the changes done

- Extended email notifications:
- In addition to basic email functionility, there is also an Extended Email (email-ext) plugin that adds numerous additional options for sending emails throught jenknins
- Mail configuration will be same as above, but also adds functionality in three areas
- Content:
- It’s possible to dynamically modify the contents of email notifications subject and body
- Recipients:
- You can define which user roles should recieve email notification
- Triggers:
- You can specify what conditions should initiate sending an email notification (This doesn’t apply to pipelines)
- Content:
- Global Configuration:
- Manage Jenkins -> Configure System -> Extended email notification
- For option setting refer class room video
- Extended email recipient categories
- Culprits
- Developers
- Requester
- To send an extended email Refer Here for the pipeline step
- Refer Here for the changes

- Now lets apply the mail and email ext in meaningful manner
- Email Ext using in declarative pipeline Refer Here
- Added email notification at multiple places Refer Here
