Browse Source

Add User-Agent header

tags/v0.1.0
Damien Goutte-Gattat 9 years ago
parent
commit
8baa680248
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/fmail.c

+ 8
- 0
src/fmail.c View File

@@ -191,9 +191,17 @@ main(int argc, char *argv[])
}
}

/* Generate automatic headers */
sb_addf(headers, "Date: %s\r\n", rfc2822_date());
sb_addf(headers, "User-Agent: fmail %s\r\n", VERSION);

/* Read user-provided headers. */
read_headers(stdin, headers);

/* Write all headers. */
fprintf(stdout, "%s\r\n", sb_get(headers));

/* Write encoded body. */
qp_encode_stream(stdin, stdout);

return EXIT_SUCCESS;


Loading…
Cancel
Save