NeoMutt  2024-02-01-23-g345d7b
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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
32struct Email;
33
34#define MUTT_ENV_CHANGED_IRT (1 << 0)
35#define MUTT_ENV_CHANGED_REFS (1 << 1)
36#define MUTT_ENV_CHANGED_XLABEL (1 << 2)
37#define MUTT_ENV_CHANGED_SUBJECT (1 << 3)
38
39#ifdef USE_AUTOCRYPT
44{
45 char *addr;
46 char *keydata;
47 bool prefer_encrypt : 1;
48 bool invalid : 1;
50};
51#endif
52
57{
58 struct AddressList return_path;
59 struct AddressList from;
60 struct AddressList to;
61 struct AddressList cc;
62 struct AddressList bcc;
63 struct AddressList sender;
64 struct AddressList reply_to;
65 struct AddressList mail_followup_to;
66 struct AddressList x_original_to;
67 char *list_post;
70 char *const subject;
71 char *const real_subj;
72 char *disp_subj;
73 char *message_id;
74 char *supersedes;
75 char *date;
76 char *x_label;
78 char *newsgroups;
79 char *xref;
82 struct Buffer spam;
83 struct ListHead references;
84 struct ListHead in_reply_to;
85 struct ListHead userhdrs;
86#ifdef USE_AUTOCRYPT
89#endif
90 unsigned char changed;
91};
92
102{
114};
115
116bool mutt_env_cmp_strict (const struct Envelope *e1, const struct Envelope *e2);
117void mutt_env_free (struct Envelope **ptr);
118void mutt_env_merge (struct Envelope *base, struct Envelope **extra);
119struct Envelope *mutt_env_new (void);
120bool mutt_env_notify_send(struct Email *e, enum NotifyEnvelope type);
121void mutt_env_set_subject(struct Envelope *env, const char *subj);
122int mutt_env_to_intl (struct Envelope *env, const char **tag, char **err);
123void mutt_env_to_local (struct Envelope *env);
124
125#ifdef USE_AUTOCRYPT
127void mutt_autocrypthdr_free(struct AutocryptHeader **ptr);
128#endif
129
130#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:355
void mutt_env_merge(struct Envelope *base, struct Envelope **extra)
Merge the headers of two Envelopes.
Definition: envelope.c:193
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
Definition: envelope.c:126
struct Envelope * mutt_env_new(void)
Create a new Envelope.
Definition: envelope.c:46
NotifyEnvelope
Types of Envelope Event.
Definition: envelope.h:102
@ NT_ENVELOPE_SUBJECT
"Subject:" header has changed
Definition: envelope.h:111
@ NT_ENVELOPE_BCC
"Bcc:" header has changed
Definition: envelope.h:103
@ NT_ENVELOPE_TO
"To:" header has changed
Definition: envelope.h:112
@ NT_ENVELOPE_FCC
"Fcc:" header has changed
Definition: envelope.h:105
@ NT_ENVELOPE_CC
"Cc:" header has changed
Definition: envelope.h:104
@ NT_ENVELOPE_MIXMASTER
MixMaster chain has changed.
Definition: envelope.h:108
@ NT_ENVELOPE_REPLY_TO
"Reply-To:" header has changed
Definition: envelope.h:110
@ NT_ENVELOPE_FROM
"From:" header has changed
Definition: envelope.h:107
@ NT_ENVELOPE_X_COMMENT_TO
"X-Comment-To:" header has changed
Definition: envelope.h:113
@ NT_ENVELOPE_FOLLOWUP_TO
"Followup-To:" header has changed
Definition: envelope.h:106
@ NT_ENVELOPE_NEWSGROUPS
"Newsgroups:" header has changed
Definition: envelope.h:109
void mutt_env_set_subject(struct Envelope *env, const char *subj)
Set both subject and real_subj to subj.
Definition: envelope.c:69
bool mutt_env_notify_send(struct Email *e, enum NotifyEnvelope type)
Send an Envelope change notification.
Definition: envelope.c:179
bool mutt_env_cmp_strict(const struct Envelope *e1, const struct Envelope *e2)
Strictly compare two Envelopes.
Definition: envelope.c:285
struct AutocryptHeader * mutt_autocrypthdr_new(void)
Create a new AutocryptHeader.
Definition: envelope.c:95
void mutt_autocrypthdr_free(struct AutocryptHeader **ptr)
Free an AutocryptHeader.
Definition: envelope.c:104
void mutt_env_to_local(struct Envelope *env)
Convert an Envelope's Address fields to local format.
Definition: envelope.c:317
Convenience wrapper for the library headers.
Parse Autocrypt header info.
Definition: envelope.h:44
bool invalid
Header is invalid.
Definition: envelope.h:48
struct AutocryptHeader * next
Linked list.
Definition: envelope.h:49
char * keydata
PGP Key data.
Definition: envelope.h:46
bool prefer_encrypt
User prefers encryption.
Definition: envelope.h:47
char * addr
Email address.
Definition: envelope.h:45
String manipulation buffer.
Definition: buffer.h:36
The envelope/body of an email.
Definition: email.h:39
The header of an Email.
Definition: envelope.h:57
struct ListHead userhdrs
user defined headers
Definition: envelope.h:85
char * supersedes
Supersedes header.
Definition: envelope.h:74
char * list_subscribe
This stores a mailto URL, or nothing.
Definition: envelope.h:68
struct AddressList return_path
Return path for the Email.
Definition: envelope.h:58
char *const subject
Email's subject.
Definition: envelope.h:70
struct AddressList to
Email's 'To' list.
Definition: envelope.h:60
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:80
struct AddressList reply_to
Email's 'reply-to'.
Definition: envelope.h:64
char * message_id
Message ID.
Definition: envelope.h:73
char * x_comment_to
List of 'X-comment-to' fields.
Definition: envelope.h:81
struct AddressList x_original_to
Email's 'X-Orig-to'.
Definition: envelope.h:66
struct AutocryptHeader * autocrypt_gossip
Autocrypt Gossip header.
Definition: envelope.h:88
char * newsgroups
List of newsgroups.
Definition: envelope.h:78
struct AddressList mail_followup_to
Email's 'mail-followup-to'.
Definition: envelope.h:65
struct AddressList cc
Email's 'Cc' list.
Definition: envelope.h:61
struct AddressList sender
Email's sender.
Definition: envelope.h:63
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
struct AddressList bcc
Email's 'Bcc' list.
Definition: envelope.h:62
char * xref
List of cross-references.
Definition: envelope.h:79
char * organization
Organisation header.
Definition: envelope.h:77
char * x_label
X-Label.
Definition: envelope.h:76
char * list_post
This stores a mailto URL, or nothing.
Definition: envelope.h:67
char *const real_subj
Offset of the real subject.
Definition: envelope.h:71
char * date
Sent date.
Definition: envelope.h:75
char * disp_subj
Display subject (modified copy of subject)
Definition: envelope.h:72
char * list_unsubscribe
This stores a mailto URL, or nothing.
Definition: envelope.h:69
struct AddressList from
Email's 'From' list.
Definition: envelope.h:59