Fixed sonar warnings in MailUtility

Change-Id: Ib744751f24c639637b306667b556164f42ad7e34
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=448648
Reviewed-on: https://git.eclipse.org/r/36261
Reviewed-by: Oli Schmid <oliver.schmid@bsiag.com>
Tested-by: Oli Schmid <oliver.schmid@bsiag.com>
Tested-by: Hudson CI