Format enrol email message

revert-70aa11f8
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 org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
import java.io.IOException; import java.io.IOException;
import java.net.URLDecoder;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -253,7 +254,8 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ
URLEncoder.encode(userName, "UTF-8")); URLEncoder.encode(userName, "UTF-8"));
messageBody = messageBody+ System.getProperty("line.separator") + enrolmentNotifications.getUrl() 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")) messageBuilder.append(messageHeader).append(System.getProperty("line.separator"))
.append(System.getProperty("line.separator")); .append(System.getProperty("line.separator"));

@ -21,7 +21,7 @@
<Notifications> <Notifications>
<EnrolmentNotifications> <EnrolmentNotifications>
<Header>Dear {title} {user-name},</Header> <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> <Url>{downloadUrl}</Url>
<Footer> <Footer>
Best Regards, Best Regards,

Loading…
Cancel
Save