ezmlmx 0.68
ezmlmx
Loading...
Searching...
No Matches
hdr_from.c
Go to the documentation of this file.
1#include "hdr.h"
2#include "qmail.h"
3#include "stralloc.h"
4#include "quote.h"
5#include "idx.h"
6#include "logmsg.h"
7#include "errtxt.h"
8#include "ezmlm.h"
9
10#define WHO "hdr_from"
11
17
18//struct qmail qq;
19// stralloc quoted = {0};
20
21static void die_nomem() { logmsg(WHO,111,FATAL,ERR_NOMEM); }
22
23void hdr_from(const char *append)
24{
25 qmail_puts(&qq,"From: ");
26 if (!quote(&quoted,&outlocal))
27 die_nomem();
28 qmail_put(&qq,quoted.s,quoted.len);
29 if (append)
30 qmail_puts(&qq,append);
31 qmail_puts(&qq,"@");
32 qmail_put(&qq,outhost.s,outhost.len);
33 qmail_puts(&qq,"\n");
34}
int quote(stralloc *saout, const stralloc *sain)
Definition quote.c:57
Error messages. If you translate these, I would urge you to keep the English version as well....
#define ERR_NOMEM
Definition errtxt.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
void die_nomem()
Definition getconf.c:17
#define WHO
Definition author.c:1
void hdr_from(const char *append)
Definition hdr_from.c:23
stralloc quoted
Definition ezmlm-clean.c:90
struct qmail qq
Definition ezmlm-clean.c:73
const char * logmsg(const char *dir, unsigned long num, unsigned long listno, unsigned long subs, int done)
Definition loginfo.c:32