int n;
int bytes;
- if (format == NULL || ap == NULL)
+ if (format == NULL)
return -1;
bytes = 0;
while (*format != '\0') {
int n;
var_mvsnprintf_cb_t ctx;
- if (format == NULL || ap == NULL)
+ if (format == NULL)
return -1;
if (buffer != NULL && bufsize == 0)
return -1;
int s, r, i, ch;
struct passwd *pwd;
char *cp, *p;
+ time_t now = time(NULL);
+ struct tm tm;
my_name_is(argc, argv, "bsmtp");
fprintf(sfp, "Cc: %s\r\n", cc_addr);
}
+ /* Add RFC822 date */
+ localtime_r(&now, &tm);
+ strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S %z", &tm);
+ fprintf(sfp, "Date: %s\r\n", buf);
+
fprintf(sfp, "\r\n");
/*