Node:Headers,
Next:Body,
Previous:Envelope,
Up:libmailbox
Headers
/* Prefix header_ is reserved */
#include <mailutils/header.h>
So far we plan support for RFC822 and plan for RFC1522. with RFC1522 non ASCII
characters will be encoded.
| int header_create (header_t *hdr, const char *blurb, size_t len, void *owner)
 | 
Function | 
| 
Initialize a hdr to a supported type.  If blurb is not NULL, it is
parsed. 
 | 
| void header_destroy (header_t *hdr, void *owner)
 | 
Function | 
| 
The resources allocated for hdr are freed. 
 | 
| int header_set_value (header_t hdr, const char *fn, const char *fv, size_t n, int replace)
 | 
Function | 
| 
Set the field-name fn to field-value fv of size n in
hdr.  If replace is non-zero the initial value is replaced, if zero
it is appended.
 Some basic macros are already provided for rfc822.
 
MU_HEADER_RETURN_PATH
- Return-Path
  MU_HEADER_RECEIVED
- Received
  MU_HEADER_DATE
- Date
  MU_HEADER_FROM
- From
  MU_HEADER_RESENT_FROM
- Resent-From
  MU_HEADER_SUBJECT
- Subject
  MU_HEADER_SENDER
- Sender
  MU_HEADER_RESENT_SENDER
- Resent-SENDER
  MU_HEADER_TO
- To
  MU_HEADER_RESENT_TO
- Resent-To
  MU_HEADER_CC
- Cc
  MU_HEADER_RESENT_CC
- Resent-Cc
  MU_HEADER_BCC
- Bcc
  MU_HEADER_RESENT_BCC
- Resent-Bcc
  MU_HEADER_REPLY_TO
- Reply-To
  MU_HEADER_RESENT_REPLY_TO
- Resent-Reply-To
  MU_HEADER_MESSAGE_ID
- Message-ID
  MU_HEADER_RESENT_MESSAGE_ID
- Resent-Message-ID
  MU_HEADER_IN_REPLY_TO
- In-Reply-To
  MU_HEADER_ENCRYPTED
- Encrypted
  MU_HEADER_PRECEDENCE
- Precedence
  MU_HEADER_STATUS
- Status
  MU_HEADER_CONTENT_LENGTH
- Content-Length
  MU_HEADER_CONTENT_TYPE
- Content-Type
  MU_HEADER_MIME_VERSION
- MIME-Version
  
 | 
| int header_get_value (header_t hdr, const char *fn, char *fv, size_t len, size_t *n)
 | 
Function | 
| 
Value of field-name fn is returned in buffer fv of size len. 
The number of bytes written is put in n. 
 | 
| int header_aget_value (header_t hdr, const char *fn, char **fv)
 | 
Function | 
| int header_get_stream (header_t hdr, stream_t *pstream)
 | 
Function | 
| int header_set_size (header_t hdr, size_t *size)
 | 
Function | 
| int header_set_lines (header_t hdr, size_t *lpines)
 | 
Function |