ezmlmx
0.68
ezmlmx
Loading...
Searching...
No Matches
ezmlmx-0.68
src
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
14
static
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
24
void
hdr_ctype
(
enum
ctype
ctype
)
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="
);
32
qmail_puts
(&
qq
,
charset
.s);
33
break
;
34
/* multipart/something, needs a boundary */
35
case
CTYPE_MULTIPART
:
36
case
CTYPE_DIGEST
:
qmail_puts
(&
qq
,
"; boundary="
);
37
qmail_put
(&
qq
,
hboundary
,
HASHLEN
);
38
break
;
39
}
40
qmail_puts
(&
qq
,
"\n"
);
41
}
42
43
void
hdr_mime
(
enum
ctype
ctype
)
44
{
45
qmail_puts
(&
qq
,
"MIME-Version: 1.0\n"
);
46
hdr_ctype
(
ctype
);
47
}
makehash.h
hdr.h
ctype
ctype
Definition
hdr.h:12
CTYPE_TEXT
@ CTYPE_TEXT
Definition
hdr.h:13
CTYPE_DIGEST
@ CTYPE_DIGEST
Definition
hdr.h:15
CTYPE_MULTIPART
@ CTYPE_MULTIPART
Definition
hdr.h:14
qmail.h
qmail_puts
void qmail_puts(struct qmail *, const char *)
Definition
qmail.c:94
qmail_put
void qmail_put(struct qmail *, const char *, int)
Definition
qmail.c:87
ezmlm.h
charset, outhost, outlocal and flagcd are shared
charset
const char * charset
Definition
ezmlm-cgi.c:110
HASHLEN
#define HASHLEN
Definition
idxthread.c:25
hboundary
char hboundary[HASHLEN]
Definition
ezmlm-clean.c:86
qq
struct qmail qq
Definition
ezmlm-clean.c:73
hdr_ctype
void hdr_ctype(enum ctype ctype)
Definition
hdr_mime.c:24
hdr_mime
void hdr_mime(enum ctype ctype)
Definition
hdr_mime.c:43
Generated on
for ezmlmx by
1.14.0