NeoMutt  2021-10-29-225-gb9986f
Teaching an old dog new tricks
Go to the documentation of this file.
27 #include "config.h"
28 #include <stdbool.h>
29 #include "mutt/lib.h"
30 #include "address/lib.h"
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)
42 {
43  char *addr;
44  char *keydata;
45  bool prefer_encrypt : 1;
46  bool invalid : 1;
48 };
49 #endif
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;
68  char *subject;
69  char *real_subj;
70  char *disp_subj;
71  char *message_id;
72  char *supersedes;
73  char *date;
74  char *x_label;
75  char *organization;
76 #ifdef USE_NNTP
77  char *newsgroups;
78  char *xref;
79  char *followup_to;
80  char *x_comment_to;
81 #endif
82  struct Buffer spam;
83  struct ListHead references;
84  struct ListHead in_reply_to;
85  struct ListHead userhdrs;
89 #endif
90  unsigned char changed;
91 };
93 bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2);
94 void mutt_env_free (struct Envelope **ptr);
95 void mutt_env_merge (struct Envelope *base, struct Envelope **extra);
96 struct Envelope *mutt_env_new (void);
97 int mutt_env_to_intl (struct Envelope *env, const char **tag, char **err);
98 void mutt_env_to_local (struct Envelope *e);
100 #ifdef USE_AUTOCRYPT
102 void mutt_autocrypthdr_free(struct AutocryptHeader **p);
103 #endif
105 #endif /* MUTT_EMAIL_ENVELOPE_H */
Email Address Handling.
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:313
void mutt_env_merge(struct Envelope *base, struct Envelope **extra)
Merge the headers of two Envelopes.
Definition: envelope.c:153
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
Definition: envelope.c:96
struct Envelope * mutt_env_new(void)
Create a new Envelope.
Definition: envelope.c:42
void mutt_autocrypthdr_free(struct AutocryptHeader **p)
Free an AutocryptHeader.
Definition: envelope.c:74
struct AutocryptHeader * mutt_autocrypthdr_new(void)
Create a new AutocryptHeader.
Definition: envelope.c:65
void mutt_env_to_local(struct Envelope *e)
Convert an Envelope's Address fields to local format.
Definition: envelope.c:275
bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2)
Strictly compare two Envelopes.
Definition: envelope.c:245
Convenience wrapper for the library headers.
Parse Autocrypt header info.
Definition: envelope.h:42
bool invalid
Header is invalid.
Definition: envelope.h:46
struct AutocryptHeader * next
Linked list.
Definition: envelope.h:47
char * keydata
PGP Key data.
Definition: envelope.h:44
bool prefer_encrypt
User prefers encryption.
Definition: envelope.h:45
char * addr
Email address.
Definition: envelope.h:43
String manipulation buffer.
Definition: buffer.h:34
The header of an Email.
Definition: envelope.h:55
struct ListHead userhdrs
user defined headers
Definition: envelope.h:85
char * supersedes
Supersedes header.
Definition: envelope.h:72
char * list_subscribe
This stores a mailto URL, or nothing.
Definition: envelope.h:66
struct AddressList return_path
Return path for the Email.
Definition: envelope.h:56
struct AddressList to
Email's 'To' list.
Definition: envelope.h:58
unsigned char changed
Changed fields, e.g. MUTT_ENV_CHANGED_SUBJECT.
Definition: envelope.h:90
char * followup_to
List of 'followup-to' fields.
Definition: envelope.h:79
struct AddressList reply_to
Email's 'reply-to'.
Definition: envelope.h:62
char * message_id
Message ID.
Definition: envelope.h:71
char * x_comment_to
List of 'X-comment-to' fields.
Definition: envelope.h:80
struct AddressList x_original_to
Email's 'X-Orig-to'.
Definition: envelope.h:64
struct AutocryptHeader * autocrypt_gossip
Autocrypt Gossip header.
Definition: envelope.h:88
char * newsgroups
List of newsgroups.
Definition: envelope.h:77
struct AddressList mail_followup_to
Email's 'mail-followup-to'.
Definition: envelope.h:63
struct AddressList cc
Email's 'Cc' list.
Definition: envelope.h:59
struct AddressList sender
Email's sender.
Definition: envelope.h:61
struct ListHead references
message references (in reverse order)
Definition: envelope.h:83
struct AutocryptHeader * autocrypt
Autocrypt header.
Definition: envelope.h:87
struct Buffer spam
Spam header.
Definition: envelope.h:82
struct ListHead in_reply_to
in-reply-to header content
Definition: envelope.h:84
char * subject
Email's subject.
Definition: envelope.h:68
struct AddressList bcc
Email's 'Bcc' list.
Definition: envelope.h:60
char * xref
List of cross-references.
Definition: envelope.h:78
char * organization
Organisation header.
Definition: envelope.h:75
char * x_label
Definition: envelope.h:74
char * list_post
This stores a mailto URL, or nothing.
Definition: envelope.h:65
char * date
Sent date.
Definition: envelope.h:73
char * real_subj
Offset of the real subject.
Definition: envelope.h:69
char * disp_subj
Display subject (modified copy of subject)
Definition: envelope.h:70
char * list_unsubscribe
This stores a mailto URL, or nothing.
Definition: envelope.h:67
struct AddressList from
Email's 'From' list.
Definition: envelope.h:57