- urlesc(urlroom, ROOMNAMELEN, qrbuf.QRname);
-
- snprintf(confirmation_request, sizeof confirmation_request,
-
- "MIME-Version: 1.0\n"
- "Content-Type: multipart/alternative; boundary=\"__ctdlmultipart__\"\n"
- "\n"
- "This is a multipart message in MIME format.\n"
- "\n"
- "--__ctdlmultipart__\n"
- "Content-type: text/plain\n"
- "\n"
- "Someone (probably you) has submitted a request to subscribe\n"
- "<%s> to the '%s' mailing list.\n"
- "\n"
- "Please go here to confirm this request:\n"
- " %s?room=%s&token=%s&cmd=confirm \n"
- "\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"
- "\n"
- "--__ctdlmultipart__\n"
- "Content-type: text/html\n"
- "\n"
- "<HTML><BODY>\n"
- "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=\"%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"
- "</BODY></HTML>\n"
- "\n"
- "--__ctdlmultipart__--\n",
-
- email, qrbuf.QRname,
- webpage, urlroom, token,
- qrbuf.QRname,
-
- email, qrbuf.QRname,
- webpage, urlroom, token,
- webpage, urlroom, token,
- qrbuf.QRname
- );
+ AddRoomCfgLine(OneRNCfg, &qrbuf, subpending, Line);
+
+ /* Generate and send the confirmation request */
+ UrlRoom = NewStrBuf();
+ StrBufUrlescAppend(UrlRoom, NULL, qrbuf.QRname);
+
+ cf_req = NewStrBufPlain(NULL, 2048);
+ StrBufAppendBufPlain(
+ cf_req,
+ HKEY("MIME-Version: 1.0\n"
+ "Content-Type: multipart/alternative; boundary=\"__ctdlmultipart__\"\n"
+ "\n"
+ "This is a multipart message in MIME format.\n"
+ "\n"
+ "--__ctdlmultipart__\n"
+ "Content-type: text/plain\n"
+ "\n"
+ "Someone (probably you) has submitted a request to subscribe\n"
+ "<"), 0);
+ StrBufAppendBuf(cf_req, Line->Value[0], 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("> to the '"), 0);
+ StrBufAppendBufPlain(cf_req, RoomMailAddress, RoomMailAddressLen, 0);
+
+ StrBufAppendBufPlain(
+ cf_req,
+ HKEY("' mailing list.\n"
+ "\n"
+ "Please go here to confirm this request:\n"
+ " "), 0);
+ StrBufAppendBuf(cf_req, Line->Value[4], 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("?room="), 0);
+ StrBufAppendBuf(cf_req, UrlRoom, 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("&token="), 0);
+ StrBufAppendBuf(cf_req, Line->Value[2], 0);
+
+ StrBufAppendBufPlain(
+ cf_req,
+ HKEY("&cmd=confirm \n"
+ "\n"
+ "If this request has been submitted in error and you do not\n"
+ "wish to receive the '"), 0);
+ StrBufAppendBufPlain(cf_req, RoomMailAddress, RoomMailAddressLen, 0);
+
+ StrBufAppendBufPlain(
+ cf_req,
+ HKEY("' mailing list, simply do nothing,\n"
+ "and you will not receive any further mailings.\n"
+ "\n"
+ "--__ctdlmultipart__\n"
+ "Content-type: text/html\n"
+ "\n"
+ "<HTML><BODY>\n"
+ "Someone (probably you) has submitted a request to subscribe\n"
+ "<"), 0);
+ StrBufAppendBuf(cf_req, Line->Value[0], 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY( "> to the <B>"), 0);
+
+ StrBufAppendBufPlain(cf_req, RoomMailAddress, RoomMailAddressLen, 0);
+
+ StrBufAppendBufPlain(
+ cf_req,
+ HKEY("'</B> mailing list.<BR><BR>\n"
+ "Please click here to confirm this request:<BR>\n"
+ "<A HREF=\""), 0);
+ StrBufAppendBuf(cf_req, Line->Value[4], 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("?room="), 0);
+ StrBufAppendBuf(cf_req, UrlRoom, 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("&token="), 0);
+ StrBufAppendBuf(cf_req, Line->Value[2], 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("&cmd=confirm\">"), 0);
+ StrBufAppendBuf(cf_req, Line->Value[4], 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("?room="), 0);
+ StrBufAppendBuf(cf_req, UrlRoom, 0);
+
+ StrBufAppendBufPlain(cf_req, HKEY("&token="), 0);
+ StrBufAppendBuf(cf_req, Line->Value[2], 0);
+
+ StrBufAppendBufPlain(
+ cf_req,
+ HKEY("&cmd=confirm</A><BR><BR>\n"
+ "If this request has been submitted in error and you do not\n"
+ "wish to receive the '"), 0);
+ StrBufAppendBufPlain(cf_req, RoomMailAddress, RoomMailAddressLen, 0);
+
+ StrBufAppendBufPlain(
+ cf_req,
+ HKEY("' mailing list, simply do nothing,\n"
+ "and you will not receive any further mailings.\n"
+ "</BODY></HTML>\n"
+ "\n"
+ "--__ctdlmultipart__--\n"), 0);
+
+ SaveRoomNetConfigFile(OneRNCfg, qrbuf.QRnumber);
+ FreeRoomNetworkStruct(&OneRNCfg);
+ end_critical_section(S_NETCONFIGS);