*
* This module handles self-service subscription/unsubscription to mail lists.
*
- * Copyright (C) 2002 by Art Cancro and others.
+ * Copyright (C) 2002-2005 by Art Cancro and others.
* This code is released under the terms of the GNU General Public License.
*
*/
FILE *ncfp;
char filename[256];
char token[256];
- char confirmation_request[512];
+ char confirmation_request[2048];
char buf[512];
char urlroom[ROOMNAMELEN];
char scancmd[64];
listsub_generate_token(token);
- assoc_file_name(filename, sizeof filename, &qrbuf, "netconfigs");
+ assoc_file_name(filename, sizeof filename, &qrbuf, ctdl_netcfg_dir);
/*
* Make sure the requested address isn't already subscribed
urlesc(urlroom, qrbuf.QRname);
snprintf(confirmation_request, sizeof confirmation_request,
- "Content-type: text/html\n\n"
+ "Content-type: text/html\nMIME-Version: 1.0\n\n"
"<HTML><BODY>"
"Someone (probably you) has submitted a request to subscribe\n"
"<%s> to the <B>%s</B> mailing list.<BR><BR>\n"
"Please click here to confirm this request:<BR>\n"
- "<A HREF=\"http://%s?room=%s&token=%s&cmd=confirm\">"
- "http://%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
+ "<A HREF=\"%s?room=%s&token=%s&cmd=confirm\">"
+ "%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
"If this request has been submitted in error and you do not\n"
"wish to receive the '%s' mailing list, simply do nothing,\n"
"and you will not receive any further mailings.\n"
char filename[256];
char token[256];
char buf[512];
- char confirmation_request[512];
+ char confirmation_request[2048];
char urlroom[ROOMNAMELEN];
char scancmd[256];
char scanemail[256];
listsub_generate_token(token);
- assoc_file_name(filename, sizeof filename, &qrbuf, "netconfigs");
+ assoc_file_name(filename, sizeof filename, &qrbuf, ctdl_netcfg_dir);
/*
* Make sure there's actually a subscription there to remove
urlesc(urlroom, qrbuf.QRname);
snprintf(confirmation_request, sizeof confirmation_request,
- "Content-type: text/html\n\n"
+ "Content-type: text/html\nMIME-Version: 1.0\n\n"
"<HTML><BODY>"
"Someone (probably you) has submitted a request "
"to unsubscribe\n"
"<%s> from the <B>%s</B> mailing list.<BR><BR>\n"
"Please click here to confirm this request:<BR>\n"
- "<A HREF=\"http://%s?room=%s&token=%s&cmd=confirm\">"
- "http://%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
+ "<A HREF=\"%s?room=%s&token=%s&cmd=confirm\">"
+ "%s?room=%s&token=%s&cmd=confirm</A><BR><BR>\n"
"If this request has been submitted in error and you do\n"
"<i>not</i> wish to unsubscribe from the "
"'%s' mailing list, simply do nothing,\n"
* Now start scanning this room's netconfig file for the
* specified token.
*/
- assoc_file_name(filename, sizeof filename, &qrbuf, "netconfigs");
+ assoc_file_name(filename, sizeof filename, &qrbuf, ctdl_netcfg_dir);
begin_critical_section(S_NETCONFIGS);
ncfp = fopen(filename, "r+");
if (ncfp != NULL) {