msg = CtdlDuplicateMessage(omsg);
- if (msg->cm_fields['K'] != NULL)
- free(msg->cm_fields['K']);
- if (msg->cm_fields['V'] == NULL){
- /* local message, no enVelope */
- StrBuf *Buf;
- Buf = NewStrBuf();
- StrBufAppendBufPlain(Buf,
- msg->cm_fields['O']
- , -1, 0);
- StrBufAppendBufPlain(Buf, HKEY("@"), 0);
- StrBufAppendBufPlain(Buf, config.c_fqdn, -1, 0);
-
- msg->cm_fields['K'] = SmashStrBuf(&Buf);
- }
- else {
- msg->cm_fields['K'] =
- strdup (msg->cm_fields['V']);
- }
- CtdlMsgSetCM_Fields(msg, 'F', SKEY(sc->Users[roommailalias]));
+ CtdlMsgSetCM_Fields(msg, 'K', SKEY(sc->Users[roommailalias]));
/* if there is no other recipient, Set the recipient
* of the list message to the email address of the
}
QN_syslog(LOG_INFO,
- "%sSending to %s\n",
+ " %sSending to %s\n",
(send)?"":"Not ",
ChrPtr(Recipient));
}
void network_spool_msg(long msgnum,
void *userdata)
{
+ struct CitContext *CCC = CC;
struct CtdlMessage *msg = NULL;
long delete_after_send = 0; /* Set to 1 to delete after spooling */
SpoolControl *sc;
msg = CtdlFetchMessage(msgnum, 1);
+ if (msg == NULL)
+ {
+ QN_syslog(LOG_ERR,
+ "failed to load Message <%ld> from disk\n",
+ msgnum);
+ return;
+ }
network_process_list(sc, msg, &delete_after_send);
network_process_digest(sc, msg, &delete_after_send);
network_process_participate(sc, msg, &delete_after_send);