* separate content-type header fields by ';' ; thanks Guido for pointing this out.
[citadel.git] / citadel / modules / calendar / serv_calendar.c
index 21d2e3d0451d21c96f7329514946323b4b1ffb67..c39296e32b9aaa10176b1e48750dc799975ee3f2 100644 (file)
@@ -167,7 +167,7 @@ void ical_write_to_cal(struct ctdluser *u, icalcomponent *cal) {
                strcat(msg->cm_fields['M'], ser);
        
                /* Now write the data */
-               CtdlSubmitMsg(msg, NULL, "");
+               CtdlSubmitMsg(msg, NULL, "", QP_EADDR);
                CtdlFreeMessage(msg);
        }
 
@@ -332,7 +332,7 @@ void ical_send_a_reply(icalcomponent *request, char *action) {
        reply_message_text = malloc(strlen(serialized_reply) + SIZ);
        if (reply_message_text != NULL) {
                sprintf(reply_message_text,
-                       "Content-type: text/calendar charset=\"utf-8\"\r\n\r\n%s\r\n",
+                       "Content-type: text/calendar; charset=\"utf-8\"\r\n\r\n%s\r\n",
                        serialized_reply
                );
 
@@ -344,11 +344,12 @@ void ical_send_a_reply(icalcomponent *request, char *action) {
                        "",
                        summary_string,         /* Use summary for subject */
                        NULL,
-                       reply_message_text);
+                       reply_message_text,
+                       NULL);
        
                if (msg != NULL) {
                        valid = validate_recipients(organizer_string, NULL, 0);
-                       CtdlSubmitMsg(msg, valid, "");
+                       CtdlSubmitMsg(msg, valid, "", QP_EADDR);
                        CtdlFreeMessage(msg);
                        free_recipients(valid);
                }
@@ -706,7 +707,7 @@ int ical_update_my_calendar_with_reply(icalcomponent *cal) {
        message_text = malloc(strlen(serialized_event) + SIZ);
        if (message_text != NULL) {
                sprintf(message_text,
-                       "Content-type: text/calendar charset=\"utf-8\"\r\n\r\n%s\r\n",
+                       "Content-type: text/calendar; charset=\"utf-8\"\r\n\r\n%s\r\n",
                        serialized_event
                );
 
@@ -719,11 +720,12 @@ int ical_update_my_calendar_with_reply(icalcomponent *cal) {
                        "",
                        "",             /* no subject */
                        NULL,
-                       message_text);
+                       message_text,
+                       NULL);
        
                if (msg != NULL) {
                        CIT_ICAL->avoid_sending_invitations = 1;
-                       CtdlSubmitMsg(msg, NULL, roomname);
+                       CtdlSubmitMsg(msg, NULL, roomname, QP_EADDR);
                        CtdlFreeMessage(msg);
                        CIT_ICAL->avoid_sending_invitations = 0;
                }
@@ -1792,11 +1794,12 @@ void ical_send_out_invitations(icalcomponent *cal) {
                        "",
                        summary_string,         /* Use summary for subject */
                        NULL,
-                       request_message_text);
+                       request_message_text,
+                       NULL);
        
                if (msg != NULL) {
                        valid = validate_recipients(attendees_string, NULL, 0);
-                       CtdlSubmitMsg(msg, valid, "");
+                       CtdlSubmitMsg(msg, valid, "", QP_EADDR);
                        CtdlFreeMessage(msg);
                        free_recipients(valid);
                }