|
|
@ -588,7 +588,9 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
log.error("======================================================================");
|
|
|
|
|
|
|
|
log.error(messageBody);
|
|
|
|
|
|
|
|
log.error("======================================================================");
|
|
|
|
StringBuilder messageBuilder = new StringBuilder();
|
|
|
|
StringBuilder messageBuilder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -609,6 +611,10 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|
|
|
+ "\\}",
|
|
|
|
+ "\\}",
|
|
|
|
URLEncoder.encode(emailMessageProperties.getUserName(), EmailConstants.EnrolmentEmailConstants
|
|
|
|
URLEncoder.encode(emailMessageProperties.getUserName(), EmailConstants.EnrolmentEmailConstants
|
|
|
|
.ENCODED_SCHEME));
|
|
|
|
.ENCODED_SCHEME));
|
|
|
|
|
|
|
|
messageBody = messageBody.trim().replaceAll("\\{" + EmailConstants.EnrolmentEmailConstants.DOMAIN
|
|
|
|
|
|
|
|
+ "\\}",
|
|
|
|
|
|
|
|
URLEncoder.encode(emailMessageProperties.getDomainName(), EmailConstants.EnrolmentEmailConstants
|
|
|
|
|
|
|
|
.ENCODED_SCHEME));
|
|
|
|
|
|
|
|
|
|
|
|
messageBody = messageBody.replaceAll("\\{" + EmailConstants.EnrolmentEmailConstants.PASSWORD + "\\}",
|
|
|
|
messageBody = messageBody.replaceAll("\\{" + EmailConstants.EnrolmentEmailConstants.PASSWORD + "\\}",
|
|
|
|
URLEncoder.encode(emailMessageProperties.getPassword(), EmailConstants.EnrolmentEmailConstants
|
|
|
|
URLEncoder.encode(emailMessageProperties.getPassword(), EmailConstants.EnrolmentEmailConstants
|
|
|
@ -624,6 +630,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
|
|
|
|
messageFooter1.trim());
|
|
|
|
messageFooter1.trim());
|
|
|
|
messageBuilder.append(System.getProperty("line.separator")).append(messageFooter2.trim());
|
|
|
|
messageBuilder.append(System.getProperty("line.separator")).append(messageFooter2.trim());
|
|
|
|
messageBuilder.append(System.getProperty("line.separator")).append(messageFooter3.trim());
|
|
|
|
messageBuilder.append(System.getProperty("line.separator")).append(messageFooter3.trim());
|
|
|
|
|
|
|
|
log.info(messageBuilder.toString());
|
|
|
|
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
throw new DeviceManagementException("Error replacing tags in email template '" +
|
|
|
|
throw new DeviceManagementException("Error replacing tags in email template '" +
|
|
|
|