Switch to side-by-side view

--- a/backend/notificationManager.js
+++ b/backend/notificationManager.js
@@ -241,8 +241,8 @@
 							logger.error("getRulesListByRulesID Failed: " + ruleslist);
 						}else{
 							logger.info("getRulesListByRulesID: Success");
-							if(ruleslist.emailTo == null){
-								httprequest.sendHttpRequest(ruleslist.hostname, ruleslist.port, ruleslist.path, ruleslist.method, {subject: eachElem.subject, value: eachElem.subjectValue,rule:eachResult.ruleid});
+							if(ruleslist[0].notificationType == 0){
+								httprequest.sendHttpRequest(ruleslist[0].hostname, ruleslist[0].port, ruleslist[0].path, ruleslist[0].method, {subject: eachElem.subject, value: eachElem.subjectValue,rule:eachResult.ruleid});
 							}else{
 								thiscron[eachResult.notType-1].proceed = true;
 								thiscron[eachResult.notType-1].list.push({subject: eachElem.subject, value: eachElem.subjectValue,rule:eachResult.ruleid})
@@ -261,7 +261,7 @@
 						if(eachCron.proceed){
 							mysql.getRulesListByRulesID(eachCron.list.rule, function(isOK, ruleslist){
 								if(isOK){
-									emailTo = ruleslist.emailTo;
+									emailTo = ruleslist[0].emailTo;
 									logger.info(handler,"Creating scheduled job for notification type",eachCron.type,"Destination list",emailTo,"Email Content",eachCron.list,"Scheduled for day",eachCron.schedule);
 									var jobid=crontab.scheduleJob("* * * "+eachCron.schedule+" * *", function(){
 										email.sendEmail(emailTo, JSON.stringify(eachCron.list));