+
+ // If there are attachments, open up a multipart/mixed MIME container.
+ if (att) {
+ snprintf(mime_boundary, sizeof(mime_boundary), "citadel-multipart-%x-%x", time(NULL), rand());
+ ctdl_printf(c, "MIME-Version: 1.0\r");
+ ctdl_printf(c, "Content-Type: multipart/mixed; boundary=\"%s\"\r", mime_boundary);
+ ctdl_write(c, HKEY("\r\n"));
+ ctdl_write(c, HKEY("\r\n"));
+ ctdl_printf(c, "--%s\r", mime_boundary); // start of message body
+ }
+
+ // This section