$Log$
+Revision 655.7 2005/09/16 20:40:44 ajc
+* CC: support for message creation, and IMAP. Not tested.
+
Revision 655.6 2005/09/16 20:21:38 ajc
* CC: and BCC: delivery are working (tested using message submittal
from WebCit) -- still missing the insertion of Y (CC) header field, and
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
/* To */
imap_output_envelope_addr(msg->cm_fields['R']);
- /* Cc */
- fieldptr = rfc822_fetch_field(msg->cm_fields['M'], "Cc");
- imap_output_envelope_addr(fieldptr);
- if (fieldptr != NULL) free(fieldptr);
+ /* Cc (we do it this way because there might be a legacy non-Citadel Cc: field present) */
+ fieldptr = msg->cm_fields['Y'];
+ if (fieldptr != NULL) {
+ imap_output_envelope_addr(fieldptr);
+ }
+ else {
+ fieldptr = rfc822_fetch_field(msg->cm_fields['M'], "Cc");
+ imap_output_envelope_addr(fieldptr);
+ if (fieldptr != NULL) free(fieldptr);
+ }
/* Bcc */
fieldptr = rfc822_fetch_field(msg->cm_fields['M'], "Bcc");
msg = CtdlFetchMessage(IMAP->msgids[seq-1], 1);
need_to_free_msg = 1;
}
- fieldptr = rfc822_fetch_field(msg->cm_fields['M'], "Cc");
+ fieldptr = msg->cm_fields['Y'];
if (fieldptr != NULL) {
if (bmstrcasestr(fieldptr, itemlist[pos+1])) {
match = 1;
}
- free(fieldptr);
+ }
+ else {
+ fieldptr = rfc822_fetch_field(msg->cm_fields['M'], "Cc");
+ if (fieldptr != NULL) {
+ if (bmstrcasestr(fieldptr, itemlist[pos+1])) {
+ match = 1;
+ }
+ free(fieldptr);
+ }
}
pos += 2;
}
struct CtdlMessage *CtdlMakeMessage(
struct ctdluser *author, /* author's user structure */
char *recipient, /* NULL if it's not mail */
+ char *recp_cc, /* NULL if it's not mail */
char *room, /* room where it's going */
int type, /* see MES_ types in header file */
int format_type, /* variformat, plain text, MIME... */
strcpy(dest_node, "");
striplt(recipient);
+ striplt(recp_cc);
snprintf(buf, sizeof buf, "cit%ld", author->usernum); /* Path */
msg->cm_fields['P'] = strdup(buf);
if (recipient[0] != 0) {
msg->cm_fields['R'] = strdup(recipient);
}
+ if (recp_cc[0] != 0) {
+ msg->cm_fields['Y'] = strdup(recp_cc);
+ }
if (dest_node[0] != 0) {
msg->cm_fields['D'] = strdup(dest_node);
}
cprintf("%d send message\n", SEND_LISTING);
}
- msg = CtdlMakeMessage(&CC->user, recp,
+ msg = CtdlMakeMessage(&CC->user, recp, cc,
CC->room.QRname, anonymous, format_type,
masquerade_as, subject, NULL);
struct CtdlMessage *CtdlMakeMessage(
struct ctdluser *author, /* author's user structure */
char *recipient, /* NULL if it's not mail */
+ char *recp_cc, /* NULL if it's not mail */
char *room, /* room where it's going */
int type, /* see MES_ types in header file */
int format_type, /* variformat, plain text, MIME... */
serialized_reply
);
- msg = CtdlMakeMessage(&CC->user, organizer_string,
+ msg = CtdlMakeMessage(&CC->user,
+ organizer_string, /* to */
+ "", /* cc */
CC->room.QRname, 0, FMT_RFC822,
"",
summary_string, /* Use summary for subject */
);
msg = CtdlMakeMessage(&CC->user,
+ "", /* No recipient */
"", /* No recipient */
roomname,
0, FMT_RFC822,
);
msg = CtdlMakeMessage(&CC->user,
+ "", /* No single recipient here */
"", /* No single recipient here */
CC->room.QRname, 0, FMT_RFC822,
"",