diff --git a/mmime.c b/mmime.c index bc6e3bc..34749e5 100644 --- a/mmime.c +++ b/mmime.c @@ -219,11 +219,16 @@ gen_file(char *file, char *ct) bithigh++; } - if (strcmp(ct, "message/rfc822") == 0 && maxlinelen < 997) - maxlinelen = 0; - gen_attachment(filename, cd); + if (strcmp(ct, "message/rfc822") == 0) { + printf("Content-Type: %s\n", ct); + printf("Content-Transfer-Encoding: %dbit\n\n", + (bitlow > 0 || bithigh > 0) ? 8 : 7); + fwrite(content, 1, size, stdout); + return 0; + } + if (bitlow == 0 && bithigh == 0 && maxlinelen <= 78 && content[size-1] == '\n') { if (!ct)