]> code.citadel.org Git - citadel.git/blobdiff - citadel/netmailer.c
* Changed the comments at the beginning of each file to a consistent format
[citadel.git] / citadel / netmailer.c
index 90a8bb83edae3c14a964ab44f368b04367cee843..ccb9b020b4c8c88d5a1c5aebf8281a4c1a13f2d3 100644 (file)
@@ -1,9 +1,7 @@
 /*
- * netmailer for Citadel/UX
- * see copyright.doc for copyright information
+ * $Id$
  *
  * netproc calls this to export Citadel mail to RFC822-compliant mailers.
- * $Id$
  */
 
 #include <stdlib.h>
@@ -16,6 +14,7 @@
 #include <limits.h>
 #include <syslog.h>
 #include "citadel.h"
+#include "genstamp.h"
 
 void LoadInternetConfig(void);
 void get_config(void);
@@ -198,7 +197,8 @@ int main(int argc, char **argv)
        FILE *fp, *rmail;
        char sbuf[200], rbuf[200], cstr[100], fstr[128];
        char nbuf[64], pbuf[128], rmname[128], buf[128];
-       char subject[200];
+       char datestamp[256];
+       char subject[256];
        time_t mid_buf;
        time_t now;
        int mlist = 0;
@@ -286,7 +286,8 @@ int main(int argc, char **argv)
         */
        fprintf(rmail, "To: %s\n", rbuf);
        time(&now);
-       fprintf(rmail, "Date: %s", asctime(localtime(&now)));
+       generate_rfc822_datestamp(datestamp, now);
+       fprintf(rmail, "Date: %s\n", datestamp);
        fprintf(rmail, "Message-Id: <%ld@%s>\n", (long) mid_buf, nbuf);
        fprintf(rmail, "X-Mailer: %s\n", CITADEL);
        fprintf(rmail, "Subject: %s\n", subject);