send alert only when server is down
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 1398e4c..260804c 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -539,6 +539,7 @@
  */
 int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
 {
+	int i = 0;
 	int err_code = 0;
 	char *errmsg = NULL;
 
@@ -592,13 +593,12 @@
       err_code |= ERR_ALERT;
       goto out;
     }
-    if (*(args[2]) != 0) {
-      strncpy(global.email_from,args[2],50);
-    }
-    else {
-      strncpy(global.email_from,"na",50);
+    strncpy(global.email_from,args[1],50);
+    for (i=0; i<3; i++) {
+      if (*(args[i+2]) != 0)
+      	strncpy(global.email_to[i],args[i+2],50);
     }
-    strncpy(global.email_to,args[1],50);
+    
   } 
 	else if (!strcmp(args[0], "daemon")) {
 		global.mode |= MODE_DAEMON;