Format enrol email message

4.x.x
manoj 10 years ago
parent 7dfd3f0dd2
commit 0a824d9644

@ -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"));

@ -21,7 +21,7 @@
<Notifications>
<EnrolmentNotifications>
<Header>Dear {title} {user-name},</Header>
<Body>Please go to the following url and enrol your device</Body>
<Body>You have been registered to the WSO2 MDM. Below is the link to enroll.</Body>
<Url>{downloadUrl}</Url>
<Footer>
Best Regards,

Loading…
Cancel
Save