/*
* Message journaling functions.
*
- * Copyright (c) 1987-2018 by the citadel.org team
+ * Copyright (c) 1987-2020 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
jmsg->msgn = NULL;
/* Submit journal message */
- CtdlSubmitMsg(journal_msg, journal_recps, "", 0);
+ CtdlSubmitMsg(journal_msg, journal_recps, "");
CM_Free(journal_msg);
}
CM_SetAsFieldSB(msg, eMesageText, &MsgBody);
/* Now write the data */
- CtdlSubmitMsg(msg, NULL, "", QP_EADDR);
+ CtdlSubmitMsg(msg, NULL, "");
CM_Free(msg);
}
if (msg != NULL) {
valid = validate_recipients(organizer_string, NULL, 0);
- CtdlSubmitMsg(msg, valid, "", QP_EADDR);
+ CtdlSubmitMsg(msg, valid, "");
CM_Free(msg);
free_recipients(valid);
}
if (msg != NULL) {
CIT_ICAL->avoid_sending_invitations = 1;
- CtdlSubmitMsg(msg, NULL, roomname, QP_EADDR);
+ CtdlSubmitMsg(msg, NULL, roomname);
CM_Free(msg);
CIT_ICAL->avoid_sending_invitations = 0;
}
if (msg != NULL) {
valid = validate_recipients(attendees_string, NULL, 0);
- CtdlSubmitMsg(msg, valid, "", QP_EADDR);
+ CtdlSubmitMsg(msg, valid, "");
CM_Free(msg);
free_recipients(valid);
}
}
if (msg != NULL) {
- msgnum = CtdlSubmitMsg(msg, valid, "", QP_EADDR);
+ msgnum = CtdlSubmitMsg(msg, valid, "");
if (do_confirm) {
cprintf("%ld\n", msgnum);
else {
/* Yes ... go ahead and post! */
if (msg != NULL) {
- new_msgnum = CtdlSubmitMsg(msg, NULL, "", 0);
+ new_msgnum = CtdlSubmitMsg(msg, NULL, "");
}
if (new_msgnum >= 0L) {
IReplyPrintf("OK [APPENDUID %ld %ld] APPEND completed",
return(1); // don't delete the inbox copy if this failed
}
- CtdlSubmitMsg(msg, valid, NULL, 0); // send the message to the new recipient
+ CtdlSubmitMsg(msg, valid, NULL); // send the message to the new recipient
free_recipients(valid);
CM_Free(msg);
return(0); // delete the inbox copy
/*
* This module handles instant messaging between users.
*
- * Copyright (c) 1987-2019 by the citadel.org team
+ * Copyright (c) 1987-2020 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
*/
snprintf(roomname, sizeof roomname, "%010ld.%s", im->usernums[1], PAGELOGROOM);
CtdlCreateRoom(roomname, 5, "", 0, 1, 1, VIEW_BBS);
- msgnum = CtdlSubmitMsg(msg, NULL, roomname, 0);
+ msgnum = CtdlSubmitMsg(msg, NULL, roomname);
CM_Free(msg);
/* If there is a valid user number in usernums[0], save a copy for them too. */
if (valid != NULL) {
valid->bounce_to = strdup(bounce_to);
valid->envelope_from = strdup(bounce_to);
- CtdlSubmitMsg(msg, valid, NULL, 0);
+ CtdlSubmitMsg(msg, valid, NULL);
}
CM_Free(msg);
free_recipients(valid);
valid->bounce_to = strdup(bounce_to);
valid->envelope_from = strdup(bounce_to);
valid->sending_room = strdup(RoomName);
- CtdlSubmitMsg(msg, valid, NULL, 0);
+ CtdlSubmitMsg(msg, valid, NULL);
free_recipients(valid);
}
/* Do not call CM_Free(msg) here; the caller will free it. */
valid = validate_recipients(ChrPtr(sc->Users[participate]) , NULL, 0);
CM_SetField(msg, eRecipient, SKEY(sc->Users[roommailalias]));
- CtdlSubmitMsg(msg, valid, "", 0);
+ CtdlSubmitMsg(msg, valid, "");
free_recipients(valid);
}
CM_Free(msg);
/*
* Consolidate mail from remote POP3 accounts.
*
- * Copyright (c) 2007-2019 by the citadel.org team
+ * Copyright (c) 2007-2020 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
res = curl_easy_perform(curl);
if (res == CURLE_OK) {
struct CtdlMessage *msg = convert_internet_message_buf(&TheMsg);
- CtdlSubmitMsg(msg, NULL, room, 0);
+ CtdlSubmitMsg(msg, NULL, room);
CM_Free(msg);
}
else {
long msgnum = (-1);
for (rr=r->rooms; rr!=NULL; rr=rr->next) {
if (rr == r->rooms) {
- msgnum = CtdlSubmitMsg(r->msg, NULL, rr->room, 0); // in first room, save msg
+ msgnum = CtdlSubmitMsg(r->msg, NULL, rr->room); // in first room, save msg
}
else {
CtdlSaveMsgPointerInRoom(rr->room, msgnum, 0, NULL); // elsewhere, save a pointer
}
else { /* Ok, we'll accept this message. */
- msgnum = CtdlSubmitMsg(msg, valid, "", 0);
+ msgnum = CtdlSubmitMsg(msg, valid, "");
if (msgnum > 0L) {
StrBufPrintf(sSMTP->OneRcpt, "250 Message accepted.\r\n");
}
CM_SetField(imsg, eAuthor, HKEY("Citadel"));
CM_SetField(imsg, eJournal, HKEY("do not journal"));
CM_SetAsFieldSB(imsg, eMesageText, &SpoolMsg);
- CtdlSubmitMsg(imsg, NULL, SMTP_SPOOLOUT_ROOM, QP_EADDR);
+ CtdlSubmitMsg(imsg, NULL, SMTP_SPOOLOUT_ROOM);
CM_Free(imsg);
}
return 0;
// replace the old queue entry with the new one
syslog(LOG_DEBUG, "smtpclient: %ld rewriting", qmsgnum);
msg = convert_internet_message_buf(&NewInstr); // This function will free NewInstr for us
- CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM, 0);
+ CtdlSubmitMsg(msg, NULL, SMTP_SPOOLOUT_ROOM);
CM_Free(msg);
CtdlDeleteMessages(SMTP_SPOOLOUT_ROOM, &qmsgnum, 1, "");
}
/*
* Utility functions for the Citadel SMTP implementation
*
- * Copyright (c) 1998-2018 by the citadel.org team
+ * Copyright (c) 1998-2020 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
valid = validate_recipients(bounceto, smtp_get_Recipients (), 0);
if (valid != NULL) {
if (valid->num_error == 0) {
- CtdlSubmitMsg(bmsg, valid, "", QP_EADDR);
+ CtdlSubmitMsg(bmsg, valid, "");
successful_bounce = 1;
}
}
/* If not, post it in the Aide> room */
if (successful_bounce == 0) {
- CtdlSubmitMsg(bmsg, NULL, CtdlGetConfigStr("c_aideroom"), QP_EADDR);
+ CtdlSubmitMsg(bmsg, NULL, CtdlGetConfigStr("c_aideroom"));
}
/* Free up the memory we used */
vcard_free(v);
syslog(LOG_DEBUG, "vcard: adding contact: %s", recipient);
- CtdlSubmitMsg(vmsg, NULL, aptr->roomname, QP_EADDR);
+ CtdlSubmitMsg(vmsg, NULL, aptr->roomname);
CM_Free(vmsg);
}
}
CM_SetFieldLONG(history_msg, eTimestamp, Now);
- CtdlSubmitMsg(history_msg, NULL, "", 0);
+ CtdlSubmitMsg(history_msg, NULL, "");
}
else {
syslog(LOG_ALERT, "Empty boundary string in history message. No history!\n");
else if (!strcasecmp(operation, "fetch")) {
CM_SetField(msg, eAuthor, HKEY("Citadel"));
CtdlCreateRoom(wwm, 5, "", 0, 1, 1, VIEW_BBS); /* Not an error if already exists */
- msgnum = CtdlSubmitMsg(msg, NULL, wwm, 0); /* Store the revision here */
+ msgnum = CtdlSubmitMsg(msg, NULL, wwm); /* Store the revision here */
/*
* WARNING: VILE SLEAZY HACK
if (!IsEmptyStr(pagename)) {
CM_SetField(msg, eExclusiveID, pagename, strlen(pagename));
}
- msgnum = CtdlSubmitMsg(msg, NULL, "", 0); /* Replace the current revision */
+ msgnum = CtdlSubmitMsg(msg, NULL, ""); /* Replace the current revision */
}
else {
/* Theoretically it is impossible to get here, but throw an error anyway */
*/
long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */
recptypes *recps, /* recipients (if mail) */
- const char *force, /* force a particular room? */
- int flags /* should the message be exported clean? */
+ const char *force /* force a particular room? */
) {
char hold_rm[ROOMNAMELEN];
char actual_rm[ROOMNAMELEN];
CM_SetField(msg, eMesageText, text, -1);
}
- long msgnum = CtdlSubmitMsg(msg, recp, room, 0);
+ long msgnum = CtdlSubmitMsg(msg, recp, room);
CM_Free(msg);
if (recp != NULL) free_recipients(recp);
return msgnum;
);
}
/* Now write the data */
- CtdlSubmitMsg(msg, NULL, roomname, 0);
+ CtdlSubmitMsg(msg, NULL, roomname);
CM_Free(msg);
}
void output_mime_parts(char *);
long send_message (struct CtdlMessage *);
void loadtroom (void);
-long CtdlSubmitMsg(struct CtdlMessage *, recptypes *, const char *, int);
+long CtdlSubmitMsg(struct CtdlMessage *, recptypes *, const char *);
long quickie_message(const char *from, const char *fromaddr, const char *to, char *room, const char *text, int format_type, const char *subject);
void GetMetaData(struct MetaData *, long);
void PutMetaData(struct MetaData *);