NeoMutt  2025-12-11-911-gd8d604
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
copy_email.h
Go to the documentation of this file.
1
24
25#ifndef MUTT_EMAIL_COPY_EMAIL_H
26#define MUTT_EMAIL_COPY_EMAIL_H
27
28#include "config.h"
29#include <stdint.h>
30#include <stdio.h>
31
32struct Email;
33struct Mailbox;
34struct Message;
35
55typedef uint16_t CopyMessageFlags;
56
58#define MUTT_CM_DECODE_CRYPT (MUTT_CM_DECODE_PGP | MUTT_CM_DECODE_SMIME)
59
64{
65 CH_NONE = 0,
66 CH_UPDATE = 1U << 0,
67 CH_WEED = 1U << 1,
68 CH_DECODE = 1U << 2,
69 CH_XMIT = 1U << 3,
70 CH_FROM = 1U << 4,
71 CH_PREFIX = 1U << 5,
72 CH_NOSTATUS = 1U << 6,
73 CH_REORDER = 1U << 7,
74 CH_NONEWLINE = 1U << 8,
75 CH_MIME = 1U << 9,
76 CH_UPDATE_LEN = 1U << 10,
77 CH_TXTPLAIN = 1U << 11,
78 CH_NOLEN = 1U << 12,
79 CH_WEED_DELIVERED = 1U << 13,
80 CH_FORCE_FROM = 1U << 14,
81 CH_NOQFROM = 1U << 15,
82 CH_UPDATE_IRT = 1U << 16,
83 CH_UPDATE_REFS = 1U << 17,
84 CH_DISPLAY = 1U << 18,
85 CH_UPDATE_LABEL = 1U << 19,
86 CH_UPDATE_SUBJECT = 1U << 20,
87 CH_VIRTUAL = 1U << 21,
88};
89typedef uint32_t CopyHeaderFlags;
90
91int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix, int wraplen);
92
93int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen);
94
95int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
96int mutt_copy_message (FILE *fp_out, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen);
97
98int mutt_append_message(struct Mailbox *m_dst, struct Mailbox *m_src, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags);
99
100#endif /* MUTT_EMAIL_COPY_EMAIL_H */
CopyMessageFlag
Flags for mutt_copy_message(), e.g.
Definition copy_email.h:40
@ MUTT_CM_PREFIX
Quote the header and body.
Definition copy_email.h:43
@ MUTT_CM_REPLYING
Replying the message.
Definition copy_email.h:50
@ MUTT_CM_DECODE_SMIME
Used for decoding S/MIME messages.
Definition copy_email.h:52
@ MUTT_CM_DECODE_PGP
Used for decoding PGP messages.
Definition copy_email.h:51
@ MUTT_CM_DECODE
Decode the message body into text/plain.
Definition copy_email.h:44
@ MUTT_CM_NOHEADER
Don't copy the message header.
Definition copy_email.h:42
@ MUTT_CM_PRINTING
Printing the message - display light.
Definition copy_email.h:49
@ MUTT_CM_CHARCONV
Perform character set conversions.
Definition copy_email.h:48
@ MUTT_CM_UPDATE
Update structs on sync.
Definition copy_email.h:46
@ MUTT_CM_DISPLAY
Output is displayed to the user.
Definition copy_email.h:45
@ MUTT_CM_VERIFY
Do signature verification.
Definition copy_email.h:53
@ MUTT_CM_WEED
Weed message/rfc822 attachment headers.
Definition copy_email.h:47
@ MUTT_CM_NONE
No flags are set.
Definition copy_email.h:41
int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen)
Copy Email header.
Definition copy_email.c:432
int mutt_append_message(struct Mailbox *m_dst, struct Mailbox *m_src, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags)
Append a message.
Definition copy_email.c:995
int mutt_copy_hdr(FILE *fp_in, FILE *fp_out, LOFF_T off_start, LOFF_T off_end, CopyHeaderFlags chflags, const char *prefix, int wraplen)
Copy header from one file to another.
Definition copy_email.c:112
int mutt_copy_message(FILE *fp_out, struct Email *e, struct Message *msg, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
Copy a message from a Mailbox.
Definition copy_email.c:920
uint32_t CopyHeaderFlags
Definition copy_email.h:89
int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
Make a copy of a message from a FILE pointer.
Definition copy_email.c:663
CopyHeaderFlag
Flags for mutt_copy_header(), e.g.
Definition copy_email.h:64
@ CH_UPDATE
Update the status and x-status fields?
Definition copy_email.h:66
@ CH_XMIT
Transmitting this message? (Ignore Lines: and Content-Length:)
Definition copy_email.h:69
@ CH_WEED_DELIVERED
Weed eventual Delivered-To headers.
Definition copy_email.h:79
@ CH_UPDATE_LEN
Update Lines: and Content-Length:
Definition copy_email.h:76
@ CH_WEED
Weed the headers?
Definition copy_email.h:67
@ CH_FROM
Retain the "From " message separator?
Definition copy_email.h:70
@ CH_UPDATE_LABEL
Update X-Label: from email->env->x_label?
Definition copy_email.h:85
@ CH_UPDATE_IRT
Update In-Reply-To:
Definition copy_email.h:82
@ CH_NOSTATUS
Suppress the status and x-status fields.
Definition copy_email.h:72
@ CH_DISPLAY
Display result to user.
Definition copy_email.h:84
@ CH_UPDATE_REFS
Update References:
Definition copy_email.h:83
@ CH_MIME
Ignore MIME fields.
Definition copy_email.h:75
@ CH_PREFIX
Quote header using $indent_string string?
Definition copy_email.h:71
@ CH_NOLEN
Don't write Content-Length: and Lines:
Definition copy_email.h:78
@ CH_VIRTUAL
Write virtual header lines too.
Definition copy_email.h:87
@ CH_NONE
No flags are set.
Definition copy_email.h:65
@ CH_UPDATE_SUBJECT
Update Subject: protected header update.
Definition copy_email.h:86
@ CH_TXTPLAIN
Generate text/plain MIME headers.
Definition copy_email.h:77
@ CH_DECODE
Do RFC2047 header decoding.
Definition copy_email.h:68
@ CH_NONEWLINE
Don't output terminating newline after the header.
Definition copy_email.h:74
@ CH_NOQFROM
Ignore ">From " line.
Definition copy_email.h:81
@ CH_FORCE_FROM
Give CH_FROM precedence over CH_WEED?
Definition copy_email.h:80
@ CH_REORDER
Re-order output of headers (specified by 'header-order')
Definition copy_email.h:73
uint16_t CopyMessageFlags
Definition copy_email.h:55
The envelope/body of an email.
Definition email.h:39
A mailbox.
Definition mailbox.h:81
A local copy of an email.
Definition message.h:34