Send Notification on change in attribute

I’d like to send a notification email when a users job title changes. I’ve got the notification part working, but not sure how I can include the old attribute and the new attribute in the notification. the "AttributeChangedFrom() seems to require hardcoding a string. Is there a way to tell it to give me something like this?
User.userPrincipalName + ’ Old Job title: ’ + User.title + ’ has been updated in Active Directory.’ + Environment.NewLine + 'New Job Title: ’ + AttributeChanged(“User.title”)

@vanessa.prota Hoping to get your valuable insight, thanks!

You must write code to loop through the “raw” changes, detect the attribute you are interested in, and then extract the required values.

It will look like this:

var oldValue = "";
var newValue = "";

foreach (var change in RawChanges)
	if (change.Name == "title")
		oldValue = change.OldValue;
		newValue = change.NewValue;

return User.userPrincipalName + " Old Job Title: " + oldValue + " has been updated in Active Directory." + Environment.NewLine + "New Job Title: " + newValue