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