ezmlmx 0.68
ezmlmx
Loading...
Searching...
No Matches
hdr_mime.c
Go to the documentation of this file.
1#include "hdr.h"
2#include "qmail.h"
3#include "makehash.h"
4#include "stralloc.h"
5#include "str.h"
6#include "ezmlm.h"
7
13
14static const char *ctype_names[] = {
15 /* This list must match enum ctype in hdr.h exactly! */
16 "text/plain",
17 "multipart/mixed",
18 "multipart/digest",
19 "message/rfc822",
20};
21
22// struct qmail qq;
23
25{
26 qmail_puts(&qq,"Content-Type: ");
27 qmail_puts(&qq,ctype_names[ctype]);
28
29 switch (ctype) {
30 /* text/plain, needs a charset */
31 case CTYPE_TEXT: qmail_puts(&qq,"; charset=");
33 break;
34 /* multipart/something, needs a boundary */
35 case CTYPE_MULTIPART:
36 case CTYPE_DIGEST: qmail_puts(&qq,"; boundary=");
38 break;
39 }
40 qmail_puts(&qq,"\n");
41}
42
44{
45 qmail_puts(&qq, "MIME-Version: 1.0\n");
47}
ctype
Definition hdr.h:12
@ CTYPE_TEXT
Definition hdr.h:13
@ CTYPE_DIGEST
Definition hdr.h:15
@ CTYPE_MULTIPART
Definition hdr.h:14
void qmail_puts(struct qmail *, const char *)
Definition qmail.c:94
void qmail_put(struct qmail *, const char *, int)
Definition qmail.c:87
charset, outhost, outlocal and flagcd are shared
const char * charset
Definition ezmlm-cgi.c:110
#define HASHLEN
Definition idxthread.c:25
char hboundary[HASHLEN]
Definition ezmlm-clean.c:86
struct qmail qq
Definition ezmlm-clean.c:73
void hdr_ctype(enum ctype ctype)
Definition hdr_mime.c:24
void hdr_mime(enum ctype ctype)
Definition hdr_mime.c:43