NeoMutt  2024-04-16-36-g75b6fb
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
99{
125};
126
136{
148};
149
150bool mutt_env_cmp_strict (const struct Envelope *e1, const struct Envelope *e2);
151void mutt_env_free (struct Envelope **ptr);
152void mutt_env_merge (struct Envelope *base, struct Envelope **extra);
153struct Envelope *mutt_env_new (void);
154bool mutt_env_notify_send(struct Email *e, enum NotifyEnvelope type);
155void mutt_env_set_subject(struct Envelope *env, const char *subj);
156int mutt_env_to_intl (struct Envelope *env, const char **tag, char **err);
157void mutt_env_to_local (struct Envelope *env);
158
159#ifdef USE_AUTOCRYPT
161void mutt_autocrypthdr_free(struct AutocryptHeader **ptr);
162#endif
163
164#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:136
@ NT_ENVELOPE_SUBJECT
"Subject:" header has changed
Definition: envelope.h:145
@ NT_ENVELOPE_BCC
"Bcc:" header has changed
Definition: envelope.h:137
@ NT_ENVELOPE_TO
"To:" header has changed
Definition: envelope.h:146
@ NT_ENVELOPE_FCC
"Fcc:" header has changed
Definition: envelope.h:139
@ NT_ENVELOPE_CC
"Cc:" header has changed
Definition: envelope.h:138
@ NT_ENVELOPE_MIXMASTER
MixMaster chain has changed.
Definition: envelope.h:142
@ NT_ENVELOPE_REPLY_TO
"Reply-To:" header has changed
Definition: envelope.h:144
@ NT_ENVELOPE_FROM
"From:" header has changed
Definition: envelope.h:141
@ NT_ENVELOPE_X_COMMENT_TO
"X-Comment-To:" header has changed
Definition: envelope.h:147
@ NT_ENVELOPE_FOLLOWUP_TO
"Followup-To:" header has changed
Definition: envelope.h:140
@ NT_ENVELOPE_NEWSGROUPS
"Newsgroups:" header has changed
Definition: envelope.h:143
void mutt_env_set_subject(struct Envelope *env, const char *subj)
Set both subject and real_subj to subj.
Definition: envelope.c:69
ExpandoDataEnvelope
Expando UIDs for Envelopes.
Definition: envelope.h:99
@ ED_ENV_REAL_NAME
Envelope.to (first)
Definition: envelope.h:111
@ ED_ENV_SUBJECT
Envelope.subject, Envelope.disp_subj.
Definition: envelope.h:116
@ ED_ENV_NEWSGROUP
Envelope.newsgroups.
Definition: envelope.h:109
@ ED_ENV_INITIALS
Envelope.from (first)
Definition: envelope.h:104
@ ED_ENV_FROM_FULL
Envelope.from (all)
Definition: envelope.h:103
@ ED_ENV_X_COMMENT_TO
Envelope.x_comment_to.
Definition: envelope.h:123
@ ED_ENV_FROM
Envelope.from (first)
Definition: envelope.h:102
@ ED_ENV_LIST_ADDRESS
Envelope.to, Envelope.cc.
Definition: envelope.h:105
@ ED_ENV_SPAM
Envelope.spam.
Definition: envelope.h:115
@ ED_ENV_SENDER
Envelope, make_from()
Definition: envelope.h:113
@ ED_ENV_TO_ALL
Envelope.to (all)
Definition: envelope.h:120
@ ED_ENV_X_LABEL
Envelope.x_label.
Definition: envelope.h:124
@ ED_ENV_NAME
Envelope.from (first)
Definition: envelope.h:108
@ ED_ENV_CC_ALL
Envelope.cc.
Definition: envelope.h:100
@ ED_ENV_ORGANIZATION
Envelope.organization.
Definition: envelope.h:110
@ ED_ENV_REPLY_TO
Envelope.reply_to.
Definition: envelope.h:112
@ ED_ENV_LIST_EMPTY
Envelope.to, Envelope.cc.
Definition: envelope.h:106
@ ED_ENV_THREAD_X_LABEL
Envelope.x_label.
Definition: envelope.h:118
@ ED_ENV_MESSAGE_ID
Envelope.message_id.
Definition: envelope.h:107
@ ED_ENV_SENDER_PLAIN
Envelope, make_from()
Definition: envelope.h:114
@ ED_ENV_USER_NAME
Envelope.to (first)
Definition: envelope.h:122
@ ED_ENV_USERNAME
Envelope.from.
Definition: envelope.h:121
@ ED_ENV_THREAD_TREE
Email.tree.
Definition: envelope.h:117
@ ED_ENV_TO
Envelope.to, Envelope.cc (first)
Definition: envelope.h:119
@ ED_ENV_FIRST_NAME
Envelope.from, Envelope.to, Envelope.cc.
Definition: envelope.h:101
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-Original-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