NeoMutt  2025-12-11-911-gd8d604
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
send.h
Go to the documentation of this file.
1
24
25#ifndef MUTT_SEND_SEND_H
26#define MUTT_SEND_SEND_H
27
28#include <stdbool.h>
29#include <stdint.h>
30#include <stdio.h>
31
32struct AddressList;
33struct Body;
34struct ConfigSubset;
35struct Email;
36struct EmailArray;
37struct Envelope;
38struct Mailbox;
39
44{
46 SEND_REPLY = 1U << 0,
47 SEND_GROUP_REPLY = 1U << 1,
48 SEND_LIST_REPLY = 1U << 2,
49 SEND_FORWARD = 1U << 3,
50 SEND_POSTPONED = 1U << 4,
51 SEND_BATCH = 1U << 5,
52 SEND_KEY = 1U << 6,
53 SEND_RESEND = 1U << 7,
56 SEND_DRAFT_FILE = 1U << 10,
57 SEND_TO_SENDER = 1U << 11,
59 SEND_NEWS = 1U << 13,
60 SEND_REVIEW_TO = 1U << 14,
62 SEND_CLI_CRYPTO = 1U << 16,
63};
64typedef uint32_t SendFlags;
65
66void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *env_cur, struct ConfigSubset *sub);
67struct Address *mutt_default_from(struct ConfigSubset *sub);
68int mutt_edit_address(struct AddressList *al, const char *field, bool expand_aliases);
69void mutt_encode_descriptions(struct Body *b, bool recurse, struct ConfigSubset *sub);
70int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, SendFlags flags, struct ConfigSubset *sub);
71void mutt_fix_reply_recipients(struct Envelope *env, struct ConfigSubset *sub);
72void mutt_forward_intro(struct Email *e, FILE *fp, struct ConfigSubset *sub);
73void mutt_forward_trailer(struct Email *e, FILE *fp, struct ConfigSubset *sub);
74void mutt_make_attribution_intro(struct Email *e, FILE *fp_out, struct ConfigSubset *sub);
75void mutt_make_attribution_trailer(struct Email *e, FILE *fp_out, struct ConfigSubset *sub);
76void mutt_make_forward_subject(struct Envelope *env, struct Email *e, struct ConfigSubset *sub);
77void mutt_make_misc_reply_headers(struct Envelope *env, struct Envelope *env_cur, struct ConfigSubset *sub);
78int mutt_resend_message(FILE *fp, struct Mailbox *m, struct Email *e_cur, struct ConfigSubset *sub);
79int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Mailbox *m, struct EmailArray *ea, struct ConfigSubset *sub);
80void mutt_set_followup_to(struct Envelope *env, struct ConfigSubset *sub);
81bool mutt_send_list_subscribe(struct Mailbox *m, struct Email *e);
82bool mutt_send_list_unsubscribe(struct Mailbox *m, struct Email *e);
83
84#endif /* MUTT_SEND_SEND_H */
void mutt_make_misc_reply_headers(struct Envelope *env, struct Envelope *env_cur, struct ConfigSubset *sub)
Set subject for a reply.
Definition send.c:1011
void mutt_encode_descriptions(struct Body *b, bool recurse, struct ConfigSubset *sub)
RFC2047 encode the content-descriptions.
Definition send.c:1500
void mutt_make_attribution_intro(struct Email *e, FILE *fp_out, struct ConfigSubset *sub)
Add "on DATE, PERSON wrote" header.
Definition send.c:668
int mutt_edit_address(struct AddressList *al, const char *field, bool expand_aliases)
Edit an email address.
Definition send.c:184
uint32_t SendFlags
Definition send.h:64
void mutt_forward_intro(struct Email *e, FILE *fp, struct ConfigSubset *sub)
Add the "start of forwarded message" text.
Definition send.c:461
void mutt_make_forward_subject(struct Envelope *env, struct Email *e, struct ConfigSubset *sub)
Create a subject for a forwarded email.
Definition send.c:991
void mutt_fix_reply_recipients(struct Envelope *env, struct ConfigSubset *sub)
Remove duplicate recipients.
Definition send.c:961
int mutt_resend_message(FILE *fp, struct Mailbox *m, struct Email *e_cur, struct ConfigSubset *sub)
Resend an email.
Definition send.c:1560
int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, SendFlags flags, struct ConfigSubset *sub)
Generate recpients for a reply email.
Definition send.c:878
struct Address * mutt_default_from(struct ConfigSubset *sub)
Get a default 'from' Address.
Definition send.c:1404
bool mutt_send_list_unsubscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list unsubscription email.
Definition send.c:2985
void mutt_forward_trailer(struct Email *e, FILE *fp, struct ConfigSubset *sub)
Add a "end of forwarded message" text.
Definition send.c:484
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Mailbox *m, struct EmailArray *ea, struct ConfigSubset *sub)
Send an email.
Definition send.c:2030
bool mutt_send_list_subscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list subscription email.
Definition send.c:2956
SendFlag
Flags for mutt_send_message(), e.g.
Definition send.h:44
@ SEND_RESEND
Reply using the current email as a template.
Definition send.h:53
@ SEND_CONSUMED_STDIN
stdin has been read; don't read it twice
Definition send.h:61
@ SEND_KEY
Mail a PGP public key.
Definition send.h:52
@ SEND_GROUP_CHAT_REPLY
Reply to all recipients preserving To/Cc.
Definition send.h:58
@ SEND_NO_FREE_HEADER
Used by the -E flag.
Definition send.h:55
@ SEND_REPLY
Reply to sender.
Definition send.h:46
@ SEND_NONE
No flags are set.
Definition send.h:45
@ SEND_BATCH
Send email in batch mode (without user interaction)
Definition send.h:51
@ SEND_FORWARD
Forward email.
Definition send.h:49
@ SEND_GROUP_REPLY
Reply to all.
Definition send.h:47
@ SEND_CLI_CRYPTO
Enable message security in modes that by default don't enable it.
Definition send.h:62
@ SEND_REVIEW_TO
Allow the user to edit the To field.
Definition send.h:60
@ SEND_DRAFT_FILE
Used by the -H flag.
Definition send.h:56
@ SEND_TO_SENDER
Compose new email to sender.
Definition send.h:57
@ SEND_LIST_REPLY
Reply to mailing list.
Definition send.h:48
@ SEND_NEWS
Reply to a news article.
Definition send.h:59
@ SEND_POSTPONED_FCC
Used by mutt_get_postponed() to signal that the Mutt-Fcc header field was present.
Definition send.h:54
@ SEND_POSTPONED
Recall a postponed email.
Definition send.h:50
void mutt_make_attribution_trailer(struct Email *e, FILE *fp_out, struct ConfigSubset *sub)
Add suffix to replied email text.
Definition send.c:679
void mutt_set_followup_to(struct Envelope *env, struct ConfigSubset *sub)
Set followup-to field.
Definition send.c:1280
void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *env_cur, struct ConfigSubset *sub)
Generate references for a reply email.
Definition send.c:1039
An email address.
Definition address.h:35
The body of an email.
Definition body.h:36
A set of inherited config items.
Definition subset.h:46
The envelope/body of an email.
Definition email.h:39
The header of an Email.
Definition envelope.h:57
A mailbox.
Definition mailbox.h:81
struct ConfigSubset * sub
Inherited config items.
Definition mailbox.h:85