Move common functions to mail.c
[rmail.git] / src / utils / mail.h
blob011d1ba366732053136ed2cb443d6b2ca5911757
1 #ifndef MAIL_H
2 #define MAIL_H
4 #include <stdio.h>
5 #include <time.h>
7 #include "mime.h"
9 #define LINE_LENGTH 1024
11 struct mail_header {
12 char filename[1024]; /* Filename */
13 char from[LINE_LENGTH]; /* From or Reply-To address */
14 char subject[LINE_LENGTH]; /* Subject */
15 unsigned char addr_md5[16]; /* MD5 sum of 'from' field */
17 time_t date; /* Mail date time */
19 long body_offset; /* File offset of start of msg body */
21 struct mime_header mime; /* MIME informations */
25 void init_mail_header(struct mail_header *hdr);
26 void parse_mail_header(FILE *fh, struct mail_header *hdr);
28 #endif /* MAIL_H */