String oldFromEmailAddress = emailSettings.getFromEmailAddress();
String newFromEmailAddress = "test@test.com";
String oldDefaultSubjectPrefix = emailSettings.getDefaultSubjectPrefix();
String newDefaultSubjectPrefix = "new" + oldDefaultSubjectPrefix;
boolean isAlertEmailToAllAdmins = emailSettings.isAlertEmailToAllAdmins();
SmtpServerSettings oldSmtpServerSettings = emailSettings.getSmtpServerSettings();
SmtpServerSettings newSmtpServerSettings = oldSmtpServerSettings.toBuilder()
.useAuthentication(!oldSmtpServerSettings.useAuthentication())
.host("new" + oldSmtpServerSettings.getHost()).username("new" + oldSmtpServerSettings.getUsername())
.password("new" + oldSmtpServerSettings.getPassword()).build();
try {