This will require 2 steps

  1. Setup a SMTP Notification Server in Configuration > Notification Servers
  2. Setup a Job Notification Policy in Application Builder > Management > Data Locations > Job Notification Policies

The first one contains all SMTP server details for xDM to be able to send emails, the second one contains the notification trigger logic (job names, success, errors, etc.) and email content.