removed deprecated call to Mail::formatDisplayName() and cleaned up some code formatting
Closes #3409325