NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
envelope.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_EMAIL_ENVELOPE_H
25 #define MUTT_EMAIL_ENVELOPE_H
26 
27 #include "config.h"
28 #include <stdbool.h>
29 #include "mutt/lib.h"
30 #include "address/lib.h"
31 
32 #define MUTT_ENV_CHANGED_IRT (1 << 0)
33 #define MUTT_ENV_CHANGED_REFS (1 << 1)
34 #define MUTT_ENV_CHANGED_XLABEL (1 << 2)
35 #define MUTT_ENV_CHANGED_SUBJECT (1 << 3)
36 
37 #ifdef USE_AUTOCRYPT
38 
42 {
43  char *addr;
44  char *keydata;
45  bool prefer_encrypt : 1;
46  bool invalid : 1;
48 };
49 #endif
50 
54 struct Envelope
55 {
56  struct AddressList return_path;
57  struct AddressList from;
58  struct AddressList to;
59  struct AddressList cc;
60  struct AddressList bcc;
61  struct AddressList sender;
62  struct AddressList reply_to;
63  struct AddressList mail_followup_to;
64  struct AddressList x_original_to;
65  char *list_post;
66  char *subject;
67  char *real_subj;
68  char *disp_subj;
69  char *message_id;
70  char *supersedes;
71  char *date;
72  char *x_label;
73  char *organization;
74 #ifdef USE_NNTP
75  char *newsgroups;
76  char *xref;
77  char *followup_to;
78  char *x_comment_to;
79 #endif
80  struct Buffer spam;
81  struct ListHead references;
82  struct ListHead in_reply_to;
83  struct ListHead userhdrs;
84 #ifdef USE_AUTOCRYPT
87 #endif
88  unsigned char changed;
89 };
90 
91 bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2);
92 void mutt_env_free (struct Envelope **ptr);
93 void mutt_env_merge (struct Envelope *base, struct Envelope **extra);
94 struct Envelope *mutt_env_new (void);
95 int mutt_env_to_intl (struct Envelope *env, const char **tag, char **err);
96 void mutt_env_to_local (struct Envelope *e);
97 
98 #ifdef USE_AUTOCRYPT
100 void mutt_autocrypthdr_free(struct AutocryptHeader **p);
101 #endif
102 
103 #endif /* MUTT_EMAIL_ENVELOPE_H */
Envelope
The header of an Email.
Definition: envelope.h:54
Envelope::subject
char * subject
Email's subject.
Definition: envelope.h:66
mutt_autocrypthdr_new
struct AutocryptHeader * mutt_autocrypthdr_new(void)
Create a new AutocryptHeader.
Definition: envelope.c:65
Envelope::bcc
struct AddressList bcc
Email's 'Bcc' list.
Definition: envelope.h:60
AutocryptHeader::next
struct AutocryptHeader * next
Definition: envelope.h:47
Envelope::followup_to
char * followup_to
List of 'followup-to' fields.
Definition: envelope.h:77
Envelope::x_original_to
struct AddressList x_original_to
Email's 'X-Orig-to'.
Definition: envelope.h:64
Envelope::in_reply_to
struct ListHead in_reply_to
in-reply-to header content
Definition: envelope.h:82
Envelope::message_id
char * message_id
Message ID.
Definition: envelope.h:69
Envelope::organization
char * organization
Organisation header.
Definition: envelope.h:73
Buffer
String manipulation buffer.
Definition: buffer.h:33
Envelope::supersedes
char * supersedes
Supersedes header.
Definition: envelope.h:70
Envelope::x_label
char * x_label
X-Label.
Definition: envelope.h:72
Envelope::autocrypt
struct AutocryptHeader * autocrypt
Definition: envelope.h:85
Envelope::date
char * date
Sent date.
Definition: envelope.h:71
Envelope::x_comment_to
char * x_comment_to
List of 'X-comment-to' fields.
Definition: envelope.h:78
mutt_env_merge
void mutt_env_merge(struct Envelope *base, struct Envelope **extra)
Merge the headers of two Envelopes.
Definition: envelope.c:151
AutocryptHeader::invalid
bool invalid
Definition: envelope.h:46
AutocryptHeader::addr
char * addr
Definition: envelope.h:43
Envelope::real_subj
char * real_subj
Offset of the real subject.
Definition: envelope.h:67
Envelope::reply_to
struct AddressList reply_to
Email's 'reply-to'.
Definition: envelope.h:62
Envelope::cc
struct AddressList cc
Email's 'Cc' list.
Definition: envelope.h:59
Envelope::xref
char * xref
List of cross-references.
Definition: envelope.h:76
Envelope::changed
unsigned char changed
Changed fields, e.g. MUTT_ENV_CHANGED_SUBJECT.
Definition: envelope.h:88
lib.h
lib.h
mutt_env_to_local
void mutt_env_to_local(struct Envelope *e)
Convert an Envelope's Address fields to local format.
Definition: envelope.c:271
mutt_env_to_intl
int mutt_env_to_intl(struct Envelope *env, const char **tag, char **err)
Convert an Envelope's Address fields to Punycode format.
Definition: envelope.c:309
Envelope::to
struct AddressList to
Email's 'To' list.
Definition: envelope.h:58
Envelope::disp_subj
char * disp_subj
Display subject (modified copy of subject)
Definition: envelope.h:68
Envelope::newsgroups
char * newsgroups
List of newsgroups.
Definition: envelope.h:75
mutt_env_new
struct Envelope * mutt_env_new(void)
Create a new Envelope.
Definition: envelope.c:42
AutocryptHeader::prefer_encrypt
bool prefer_encrypt
Definition: envelope.h:45
Envelope::userhdrs
struct ListHead userhdrs
user defined headers
Definition: envelope.h:83
Envelope::from
struct AddressList from
Email's 'From' list.
Definition: envelope.h:57
mutt_autocrypthdr_free
void mutt_autocrypthdr_free(struct AutocryptHeader **p)
Free an AutocryptHeader.
Definition: envelope.c:74
AutocryptHeader
Parse Autocrypt header info.
Definition: envelope.h:41
Envelope::spam
struct Buffer spam
Spam header.
Definition: envelope.h:80
Envelope::list_post
char * list_post
This stores a mailto URL, or nothing.
Definition: envelope.h:65
mutt_env_free
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
Definition: envelope.c:96
Envelope::return_path
struct AddressList return_path
Return path for the Email.
Definition: envelope.h:56
AutocryptHeader::keydata
char * keydata
Definition: envelope.h:44
Envelope::mail_followup_to
struct AddressList mail_followup_to
Email's 'mail-followup-to'.
Definition: envelope.h:63
Envelope::references
struct ListHead references
message references (in reverse order)
Definition: envelope.h:81
Envelope::sender
struct AddressList sender
Email's sender.
Definition: envelope.h:61
Envelope::autocrypt_gossip
struct AutocryptHeader * autocrypt_gossip
Definition: envelope.h:86
mutt_env_cmp_strict
bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2)
Strictly compare two Envelopes.
Definition: envelope.c:241