diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java index 96ef8378e1b..9e37cc43c98 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java @@ -43,6 +43,7 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementService; import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; import java.io.IOException; +import java.net.URLDecoder; import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; @@ -253,7 +254,8 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ URLEncoder.encode(userName, "UTF-8")); messageBody = messageBody+ System.getProperty("line.separator") + enrolmentNotifications.getUrl() - .replaceAll("\\{downloadUrl\\}", URLEncoder.encode(enrolUrl, "UTF-8")); + .replaceAll("\\{downloadUrl\\}", URLDecoder.decode(enrolUrl, "UTF-8")); + messageBuilder.append(messageHeader).append(System.getProperty("line.separator")) .append(System.getProperty("line.separator")); diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml index 807329de5ac..edfc7a924f5 100644 --- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml @@ -21,7 +21,7 @@
Dear {title} {user-name},
- Please go to the following url and enrol your device + You have been registered to the WSO2 MDM. Below is the link to enroll. {downloadUrl}