From: Wilfried Goesgens Date: Wed, 18 May 2011 21:35:30 +0000 (+0000) Subject: Don't overwrite the 'TO' when sending mailinglist mails; we put ourselves into 'reply... X-Git-Tag: v8.11~1054 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=d1b2fa089bb64be9de05b77618132664c20f6936;p=citadel.git Don't overwrite the 'TO' when sending mailinglist mails; we put ourselves into 'reply to:' --- diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index 300b1b6bc..b9451547e 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -735,20 +735,16 @@ void network_spool_msg(long msgnum, void *userdata) { } /* else we won't modify the buffer, since the roomname is already here. */ - /* Set the recipient of the list message to the - * email address of the room itself. - * FIXME ... I want to be able to pick any address - */ - if (msg->cm_fields['R'] != NULL) { - free(msg->cm_fields['R']); - } - msg->cm_fields['R'] = malloc(256); - snprintf(msg->cm_fields['R'], 256, - "room_%s@%s", CC->room.QRname, - config.c_fqdn); - for (i=0; msg->cm_fields['R'][i]; ++i) { - if (isspace(msg->cm_fields['R'][i])) { - msg->cm_fields['R'][i] = '_'; + /* if we don't already have a 'reply to' field, put our roomname in. */ + if (msg->cm_fields['K'] == NULL) { + msg->cm_fields['K'] = malloc(256); + snprintf(msg->cm_fields['K'], 256, + "room_%s@%s", CC->room.QRname, + config.c_fqdn); + for (i=0; msg->cm_fields['K'][i]; ++i) { + if (isspace(msg->cm_fields['K'][i])) { + msg->cm_fields['K'][i] = '_'; + } } }