NeoMutt  2020-04-24
Teaching an old dog new tricks
DOXYGEN
send.h
Go to the documentation of this file.
1 
23 #ifndef MUTT_SEND_H
24 #define MUTT_SEND_H
25 
26 #include <stdbool.h>
27 #include <stdint.h>
28 #include <stdio.h>
29 
30 struct Address;
31 struct AddressList;
32 struct Body;
33 struct Context;
34 struct Email;
35 struct EmailList;
36 struct Envelope;
37 struct Mailbox;
38 
39 /* These Config Variables are only used in send.c */
40 extern unsigned char C_AbortNoattach; /* forgotten attachment detector */
41 extern struct Regex *C_AbortNoattachRegex;
42 extern unsigned char C_AbortNosubject;
43 extern unsigned char C_AbortUnmodified;
44 extern bool C_AskFollowUp;
45 extern bool C_AskXCommentTo;
46 extern char * C_ContentType;
47 extern bool C_CryptAutoencrypt;
48 extern bool C_CryptAutopgp;
49 extern bool C_CryptAutosign;
50 extern bool C_CryptAutosmime;
51 extern bool C_CryptReplyencrypt;
52 extern bool C_CryptReplysign;
53 extern bool C_CryptReplysignencrypted;
54 extern char * C_EmptySubject;
55 extern bool C_FastReply;
56 extern unsigned char C_FccAttach;
57 extern bool C_FccBeforeSend;
58 extern bool C_FccClear;
59 extern bool C_FollowupTo;
60 extern char * C_ForwardAttributionIntro;
61 extern char * C_ForwardAttributionTrailer;
62 extern unsigned char C_ForwardEdit;
63 extern char * C_ForwardFormat;
64 extern bool C_ForwardReferences;
65 extern bool C_Hdrs;
66 extern unsigned char C_HonorFollowupTo;
67 extern bool C_IgnoreListReplyTo;
68 extern unsigned char C_Include;
69 extern bool C_Metoo;
70 extern bool C_NmRecord;
71 extern bool C_PgpReplyinline;
72 extern char * C_PostIndentString;
73 extern bool C_PostponeEncrypt;
74 extern char * C_PostponeEncryptAs;
75 extern unsigned char C_Recall;
76 extern bool C_ReplySelf;
77 extern unsigned char C_ReplyTo;
78 extern bool C_ReplyWithXorig;
79 extern bool C_ReverseName;
80 extern bool C_ReverseRealname;
81 extern bool C_SigDashes;
82 extern char * C_Signature;
83 extern bool C_SigOnTop;
84 extern bool C_UseFrom;
85 
86 typedef uint16_t SendFlags;
87 #define SEND_NO_FLAGS 0
88 #define SEND_REPLY (1 << 0)
89 #define SEND_GROUP_REPLY (1 << 1)
90 #define SEND_LIST_REPLY (1 << 2)
91 #define SEND_FORWARD (1 << 3)
92 #define SEND_POSTPONED (1 << 4)
93 #define SEND_BATCH (1 << 5)
94 #define SEND_MAILX (1 << 6)
95 #define SEND_KEY (1 << 7)
96 #define SEND_RESEND (1 << 8)
97 #define SEND_POSTPONED_FCC (1 << 9)
98 #define SEND_NO_FREE_HEADER (1 << 10)
99 #define SEND_DRAFT_FILE (1 << 11)
100 #define SEND_TO_SENDER (1 << 12)
101 #define SEND_GROUP_CHAT_REPLY (1 << 13)
102 #define SEND_NEWS (1 << 14)
103 
104 int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Context *ctx, struct EmailList *el);
105 void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv);
106 struct Address *mutt_default_from(void);
107 int mutt_edit_address(struct AddressList *al, const char *field, bool expand_aliases);
108 void mutt_encode_descriptions(struct Body *b, bool recurse);
109 int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, SendFlags flags);
110 void mutt_fix_reply_recipients(struct Envelope *env);
111 void mutt_forward_intro(struct Mailbox *m, struct Email *e, FILE *fp);
112 void mutt_forward_trailer(struct Mailbox *m, struct Email *e, FILE *fp);
113 void mutt_make_attribution(struct Mailbox *m, struct Email *e, FILE *fp_out);
114 void mutt_make_forward_subject(struct Envelope *env, struct Mailbox *m, struct Email *e);
115 void mutt_make_misc_reply_headers(struct Envelope *env, struct Envelope *curenv);
116 void mutt_make_post_indent(struct Mailbox *m, struct Email *e, FILE *fp_out);
117 struct Address *mutt_remove_xrefs(struct Address *a, struct Address *b);
118 int mutt_resend_message(FILE *fp, struct Context *ctx, struct Email *e_cur);
119 void mutt_set_followup_to(struct Envelope *e);
120 
121 #endif /* MUTT_SEND_H */
char * C_Signature
Config: File containing a signature to append to all mail.
Definition: send.c:132
The "current" mailbox.
Definition: context.h:37
bool C_CryptAutosign
Config: Automatically PGP sign all outgoing mail.
Definition: send.c:99
int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, SendFlags flags)
Generate recpients for a reply email.
Definition: send.c:828
bool C_IgnoreListReplyTo
Config: Ignore the &#39;Reply-To&#39; header when using <reply> on a mailing list.
Definition: send.c:117
bool C_ReplyWithXorig
Config: Create &#39;From&#39; header from &#39;X-Original-To&#39; header.
Definition: send.c:128
char * C_EmptySubject
Config: Subject to use when replying to an email with none.
Definition: send.c:104
The envelope/body of an email.
Definition: email.h:37
void mutt_make_misc_reply_headers(struct Envelope *env, struct Envelope *curenv)
Set subject for a reply.
Definition: send.c:955
char * C_ForwardAttributionTrailer
Config: Suffix message for forwarded messages.
Definition: send.c:111
bool C_SigDashes
Config: Insert &#39;– &#39; before the signature.
Definition: send.c:131
void mutt_make_post_indent(struct Mailbox *m, struct Email *e, FILE *fp_out)
Add suffix to replied email text.
Definition: send.c:666
bool C_CryptReplysign
Config: Sign replies to signed messages.
Definition: send.c:102
char * C_ForwardFormat
Config: printf-like format string to control the subject when forwarding a message.
Definition: send.c:113
void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv)
Generate references for a reply email.
Definition: send.c:977
bool C_CryptAutoencrypt
Config: Automatically PGP encrypt all outgoing mail.
Definition: send.c:97
An email address.
Definition: address.h:34
unsigned char C_Recall
Config: Recall postponed mesaages when asked to compose a message.
Definition: send.c:125
struct Regex * C_AbortNoattachRegex
Config: Regex to match text indicating attachments are expected.
Definition: send.c:91
unsigned char C_ReplyTo
Config: Address to use as a &#39;Reply-To&#39; header.
Definition: send.c:127
bool C_FastReply
Config: Don&#39;t prompt for the recipients and subject when replying/forwarding.
Definition: send.c:105
bool C_SigOnTop
Config: Insert the signature before the quoted text.
Definition: send.c:133
uint16_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
Definition: send.h:86
void mutt_forward_trailer(struct Mailbox *m, struct Email *e, FILE *fp)
Add a "end of forwarded message" text.
Definition: send.c:449
unsigned char C_Include
Config: Include a copy of the email that&#39;s being replied to.
Definition: send.c:118
struct Address * mutt_default_from(void)
Get a default &#39;from&#39; Address.
Definition: send.c:1333
unsigned char C_FccAttach
Config: Save send message with all their attachments.
Definition: send.c:106
The body of an email.
Definition: body.h:34
unsigned char C_AbortNoattach
Config: Abort sending the email if attachments are missing.
Definition: send.c:90
void mutt_encode_descriptions(struct Body *b, bool recurse)
rfc2047 encode the content-descriptions
Definition: send.c:1447
bool C_PostponeEncrypt
Config: Self-encrypt postponed messages.
Definition: send.c:123
void mutt_set_followup_to(struct Envelope *e)
Set followup-to field.
Definition: send.c:1213
bool C_FccBeforeSend
Config: Save FCCs before sending the message.
Definition: send.c:107
char * C_PostponeEncryptAs
Config: Fallback encryption key for postponed messages.
Definition: send.c:124
bool C_CryptReplyencrypt
Config: Encrypt replies to encrypted messages.
Definition: send.c:101
bool C_AskXCommentTo
Config: (nntp) Ask the user for the &#39;X-Comment-To&#39; field before editing.
Definition: send.c:95
bool C_ReverseName
Config: Set the &#39;From&#39; from the address the email was sent to.
Definition: send.c:129
bool C_ReverseRealname
Config: Set the &#39;From&#39; from the full &#39;To&#39; address the email was sent to.
Definition: send.c:130
bool C_FccClear
Config: Save sent messages unencrypted and unsigned.
Definition: send.c:108
bool C_Metoo
Config: Remove the user&#39;s address from the list of recipients.
Definition: send.c:119
unsigned char C_AbortNosubject
Config: Abort creating the email if subject is missing.
Definition: send.c:92
A mailbox.
Definition: mailbox.h:81
bool C_NmRecord
Config: (notmuch) If the &#39;record&#39; mailbox (sent mail) should be indexed.
Definition: send.c:120
bool C_CryptAutosmime
Config: Allow automatic SMIME functions.
Definition: send.c:100
void mutt_fix_reply_recipients(struct Envelope *env)
Remove duplicate recipients.
Definition: send.c:911
struct Address * mutt_remove_xrefs(struct Address *a, struct Address *b)
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Context *ctx, struct EmailList *el)
Send an email.
Definition: send.c:1893
bool C_ForwardReferences
Config: Set the &#39;In-Reply-To&#39; and &#39;References&#39; headers when forwarding a message. ...
Definition: send.c:114
bool C_AskFollowUp
Config: (nntp) Ask the user for follow-up groups before editing.
Definition: send.c:94
bool C_UseFrom
Config: Set the &#39;From&#39; header for outgoing mail.
Definition: send.c:134
int mutt_edit_address(struct AddressList *al, const char *field, bool expand_aliases)
Edit an email address.
Definition: send.c:208
Cached regular expression.
Definition: regex3.h:88
char * C_ContentType
Config: Default "Content-Type" for newly composed messages.
Definition: send.c:96
bool C_CryptReplysignencrypted
Config: Sign replies to encrypted messages.
Definition: send.c:103
char * C_ForwardAttributionIntro
Config: Prefix message for forwarded messages.
Definition: send.c:110
bool C_FollowupTo
Config: Add the &#39;Mail-Followup-To&#39; header is generated when sending mail.
Definition: send.c:109
char * C_PostIndentString
Config: Suffix message to add after reply text.
Definition: send.c:122
int mutt_resend_message(FILE *fp, struct Context *ctx, struct Email *e_cur)
Resend an email.
Definition: send.c:1504
bool C_ReplySelf
Config: Really reply to yourself, when replying to your own email.
Definition: send.c:126
bool C_Hdrs
Config: Add custom headers to outgoing mail.
Definition: send.c:115
bool C_PgpReplyinline
Config: Reply using old-style inline PGP messages (not recommended)
Definition: send.c:121
unsigned char C_ForwardEdit
Config: Automatically start the editor when forwarding a message.
Definition: send.c:112
void mutt_make_attribution(struct Mailbox *m, struct Email *e, FILE *fp_out)
Add "on DATE, PERSON wrote" header.
Definition: send.c:647
unsigned char C_HonorFollowupTo
Config: Honour the &#39;Mail-Followup-To&#39; header when group replying.
Definition: send.c:116
void mutt_make_forward_subject(struct Envelope *env, struct Mailbox *m, struct Email *e)
Create a subject for a forwarded email.
Definition: send.c:938
bool C_CryptAutopgp
Config: Allow automatic PGP functions.
Definition: send.c:98
The header of an Email.
Definition: envelope.h:54
void mutt_forward_intro(struct Mailbox *m, struct Email *e, FILE *fp)
Add the "start of forwarded message" text.
Definition: send.c:430
unsigned char C_AbortUnmodified
Config: Abort the sending if the message hasn&#39;t been edited.
Definition: send.c:93