From 2479be9f5a0b34a886c59888752da2e5804098a9 Mon Sep 17 00:00:00 2001 From: geethkokila Date: Mon, 2 Nov 2015 19:37:21 +0530 Subject: [PATCH] Fixing the email client issue --- .../mgt/core/email/sender/EmailServiceProviderImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/email/sender/EmailServiceProviderImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/email/sender/EmailServiceProviderImpl.java index 4d450c139a1..cd537f62a8a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/email/sender/EmailServiceProviderImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/email/sender/EmailServiceProviderImpl.java @@ -34,7 +34,6 @@ import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.EmailMessageProperties; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; -import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig; import org.wso2.carbon.device.mgt.core.config.email.EmailConfigurations; import org.wso2.carbon.device.mgt.core.internal.EmailServiceDataHolder; import org.wso2.carbon.device.mgt.core.service.EmailService; @@ -91,8 +90,8 @@ public class EmailServiceProviderImpl implements EmailService { payload.setText(body); try { ServiceClient serviceClient; - ConfigurationContext configContext = EmailServiceDataHolder.getInstance() - .getConfigurationContextService().getClientConfigContext(); + ConfigurationContext configContext = EmailServiceDataHolder.getInstance(). + getConfigurationContextService().getServerConfigContext(); //Set configuration service client if available, else create new service client if (configContext != null) { serviceClient = new ServiceClient(configContext, null);