Call Command from Command Factory
SendMsgCmd cmdSendMsg = (SendMsgCmd)CommandFactory.createCommand("com.ibm.commerce.messaging.commands.SendMsgCmd", getStoreId());
cmdSendMsg.setMsgType("TestMsgType");
cmdSendMsg.setStoreID(getStoreId());
cmdSendMsg.setConfigData("recipient",emailId);
cmdSendMsg.setContent(null,"-1",body.getBytes());
cmdSendMsg.setConfigData("subject",subject);
cmdSendMsg.sendImmediate();
cmdSendMsg.setCommandContext(getCommandContext());
cmdSendMsg.execute();
cmdSendMsg.setMsgType("TestMsgType");
cmdSendMsg.setStoreID(getStoreId());
cmdSendMsg.setConfigData("recipient",emailId);
cmdSendMsg.setContent(null,"-1",body.getBytes());
cmdSendMsg.setConfigData("subject",subject);
cmdSendMsg.sendImmediate();
cmdSendMsg.setCommandContext(getCommandContext());
cmdSendMsg.execute();
Comments
Post a Comment