#define FUNAMBOL_WS "/funambol/services/admin"
-int notify_funambol_server(char *user, char *msgid);
+int notify_funambol_server(char *user, char *msgid, long MsgNum);
void extNotify_getPrefs(long configMsgNum, char *configMsg);
long extNotify_getConfigMessage(char *username);
int extPagerAllowed = strncasecmp(configMsg, PAGER_CONFIG_TEXT, strlen(PAGER_CONFIG_TEXT));
if (fnblAllowed == 0) {
notify_funambol_server(msg->cm_fields['W'],
- msg->cm_fields['I']);
+ msg->cm_fields['I'],
+ msgnum);
} else if (extPagerAllowed == 0) {
char *number = strtok(configMsg, "textmessage\n");
int commandSiz = sizeof(config.c_pager_program) + strlen(number) + strlen(msg->cm_fields['W']) + 5;
* of new mail for a user
* Returns 0 if unsuccessful
*/
-int notify_funambol_server(char *user, char *msgid) {
+int notify_funambol_server(char *user, char *msgid, long MsgNum) {
char port[1024];
+ char msgnumstr[128];
int sock = -1;
char *buf = NULL;
char *SOAPMessage = NULL;
aide_message(buf, "External notifier unable to find message template!");
goto free;
}
-
+ snprintf(msgnumstr, 128, "%ld", MsgNum);
buf = malloc(SIZ);
memset(buf, 0, SIZ);
help_subst(SOAPMessage, "^notifyuser", user);
help_subst(SOAPMessage, "^syncsource", config.c_funambol_source);
help_subst(SOAPMessage, "^msgid", msgid);
-
+ help_subst(SOAPMessage, "^msgnum", msgnumstr);
+
/* Build the HTTP request header */