73 mutt_error(
_(
"You may only bounce message/rfc822 parts"));
127 if ((*app)->body == b)
177 mutt_error(
_(
"Warning: message contains no From: header"));
218 buf_printf(prompt, ngettext(
"Bounce message to %s?",
"Bounce messages to %s?", num_msg),
224 mutt_message(ngettext(
"Message not bounced",
"Messages not bounced", num_msg));
240 mutt_message(ngettext(
"Message bounced",
"Messages bounced", num_msg));
242 mutt_error(ngettext(
"Error bouncing message",
"Error bouncing messages", num_msg));
279 for (i = 0; i < actx->
idxlen; i++)
288 if (nchildren == nattach)
312 while ((++i < actx->idxlen) && (actx->
idx[i]->
level >
level))
336 struct Body *b = app ? (*app)->
body : NULL;
337 for (
short i = 0; i < actx->
idxlen; i++)
342 parent = actx->
idx[i];
365 FILE *fp_out,
const char *prefix)
381 else if (!c_text_flowed)
385 setlocale(LC_TIME,
NONULL(c_attribution_locale));
387 setlocale(LC_TIME,
"");
411 struct AttachPtrArray *aa,
bool force)
420 last = &((*last)->next);
435 struct AttachPtrArray *aa)
437 bool mime_fwd_all =
false;
438 bool mime_fwd_any =
true;
439 struct Email *e_parent = NULL;
440 FILE *fp_parent = NULL;
442 struct Buffer *tempfile = NULL;
446 struct AttachPtr *current = first ? *first : NULL;
447 struct Body *b = current ? current->
body : NULL;
448 FILE *fp = current ? current->
fp : NULL;
457 fp_parent = parent->
fp;
495 setlocale(LC_TIME,
NONULL(c_attribution_locale));
498 setlocale(LC_TIME,
"");
523 ans =
query_quadoption(
_(
"Can't decode all selected attachments. MIME-forward the others?"),
528 mime_fwd_any =
false;
533 struct State state = { 0 };
572 state.
fp_in = (*app)->fp;
628 FILE *
fp = current->
fp;
631 struct Email *e_tmp = NULL;
633 struct Body **last = NULL;
634 struct Buffer *tempfile = NULL;
667 if (c_forward_decode)
709 last = &((*last)->next);
773 struct Email *e = NULL;
777 curenv = parent->
env;
888 bool mime_reply_any =
false;
896 FILE *
fp = current->
fp;
899 struct Email *e_parent = NULL;
900 FILE *fp_parent = NULL;
901 struct Email *e_tmp = NULL;
903 struct Buffer *tempfile = NULL;
921 fp_parent = parent->
fp;
938 mime_reply_any =
true;
940 else if (nattach == 1)
942 mime_reply_any =
true;
949 e_parent ? e_parent : (b ? b->
email : NULL),
970 struct State state = { 0 };
982 setlocale(LC_TIME,
NONULL(c_attribution_locale));
984 setlocale(LC_TIME,
"");
1018 state.
fp_in = (*app)->fp;
1027 if (mime_reply_any && (nattach > 1) &&
1080 mutt_error(
_(
"You may only compose to sender with message/rfc822 parts"));
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
const struct CompleteOps CompleteAliasOps
Auto-Completion of Aliases.
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_EMPTY(head)
Check if an array is empty.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_FREE(head)
Release all memory.
#define ARRAY_GET(head, idx)
Return the element at index.
#define ARRAY_HEAD_INITIALIZER
Static initializer for arrays.
Handling of email attachments.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Convenience wrapper for the config headers.
int mutt_body_copy(FILE *fp, struct Body **b_dst, struct Body *b_src)
Create a send-mode duplicate from a receive-mode body.
int mutt_copy_header(FILE *fp_in, struct Email *e, FILE *fp_out, CopyHeaderFlags chflags, const char *prefix, int wraplen)
Copy Email header.
int mutt_copy_message_fp(FILE *fp_out, FILE *fp_in, struct Email *e, CopyMessageFlags cmflags, CopyHeaderFlags chflags, int wraplen)
Make a copy of a message from a FILE pointer.
@ MUTT_CM_PREFIX
Quote the header and body.
@ MUTT_CM_DECODE
Decode the message body into text/plain.
@ MUTT_CM_NOHEADER
Don't copy the message header.
@ MUTT_CM_CHARCONV
Perform character set conversions.
@ MUTT_CM_WEED
Weed message/rfc822 attachment headers.
@ MUTT_CM_NONE
No flags are set.
@ CH_WEED
Weed the headers?
@ CH_PREFIX
Quote header using $indent_string string?
@ CH_DECODE
Do RFC2047 header decoding.
@ CH_REORDER
Re-order output of headers (specified by 'header-order')
uint16_t CopyMessageFlags
Convenience wrapper for the core headers.
int mutt_make_string(struct Buffer *buf, size_t max_cols, const struct Expando *exp, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
@ MUTT_COMP_NONE
No flags are set.
struct Email * email_new(void)
Create a new Email.
void email_free(struct Email **ptr)
Free an Email.
Structs that make up an email.
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
struct Envelope * mutt_env_new(void)
Create a new Envelope.
void mutt_file_unlink(const char *s)
Delete a file, carefully.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
void mutt_set_flag(struct Mailbox *m, struct Email *e, enum MessageType flag, bool bf, bool upd_mbox)
Set a flag on an email.
bool OptNewsSend
(pseudo) used to change behavior when posting
int mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
#define mutt_message(...)
Convenience wrapper for the gui headers.
bool mutt_can_decode(struct Body *b)
Will decoding the attachment produce any output.
int mutt_body_handler(struct Body *b, struct State *state)
Handler for the Body of an email.
Read/write command history from/to a file.
GUI manage the main index (list of emails)
#define FREE(x)
Free memory and set the pointer to NULL.
void msgwin_clear_text(struct MuttWindow *win)
Clear the text in the Message Window.
Convenience wrapper for the library headers.
#define state_putc(STATE, STR)
@ STATE_CHARCONV
Do character set conversions.
@ STATE_WEED
Weed headers even when not in display mode.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
Many unsorted constants and some structs.
@ MUTT_REPLIED
Messages that have been replied to.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
QuadOption
Possible values for a quad-option.
@ MUTT_ABORT
User aborted the question (with Ctrl-G)
@ MUTT_NO
User answered 'No', or assume 'No'.
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
enum QuadOption query_quadoption(const char *prompt, struct ConfigSubset *sub, const char *name)
Ask the user a quad-question.
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
static void attach_include_reply(FILE *fp, FILE *fp_tmp, struct Email *e)
This is very similar to send.c's include_reply()
void mutt_attach_mail_sender(struct AttachPtrArray *aa)
Compose an email to the sender in the email attachment.
static void attach_forward_bodies(struct Email *e, struct AttachCtx *actx, struct AttachPtrArray *aa)
Forward one or several MIME bodies.
static bool check_all_msg(struct AttachPtrArray *aa, bool err)
Are all the selected Attachments RFC822 messages?
static short count_selected_children(struct AttachCtx *actx, short i, struct AttachPtrArray *aa)
Selected children below a multipart/message attachment.
static struct AttachPtr * find_common_parent(struct AttachCtx *actx, struct AttachPtrArray *aa)
Find a common parent message for the selected attachments.
static bool aa_contains_body(struct AttachPtrArray *aa, const struct Body *b)
Does the selection contain a Body?
static void attach_forward_msgs(struct AttachPtrArray *aa, SendFlags flags)
Forward one or several message-type attachments.
static struct AttachPtr * find_parent(struct AttachCtx *actx, struct AttachPtrArray *aa)
Find the parent of a selected Attachment set.
static bool check_can_decode(struct AttachPtrArray *aa)
Can we decode all selected attachments?
static int attach_reply_envelope_defaults(struct Envelope *env, struct AttachPtrArray *aa, struct Email *parent, SendFlags flags)
Create the envelope defaults for a reply.
static void include_header(bool quote, FILE *fp_in, struct Email *e, FILE *fp_out, const char *prefix)
Write an email header to a file, optionally quoting it.
static int is_parent(short i, struct AttachCtx *actx, const struct Body *b)
Check whether one attachment is the parent of another.
void mutt_attach_reply(struct AttachPtrArray *aa, struct Mailbox *m, struct Email *e, struct AttachCtx *actx, SendFlags flags)
Attach a reply.
void mutt_attach_resend(struct AttachPtrArray *aa, struct Mailbox *m)
Resend-message, from the attachment menu.
void attach_bounce_message(struct AttachPtrArray *aa, struct Mailbox *m)
Bounce function, from the attachment menu.
void mutt_attach_forward(struct AttachPtrArray *aa, struct Email *e, struct AttachCtx *actx, SendFlags flags)
Forward selected attachments.
static bool check_msg(struct Body *b, bool err)
Are we working with an RFC822 message.
static struct Body ** copy_problematic_attachments(struct Body **last, struct AttachPtrArray *aa, bool force)
Attach the body parts which can't be decoded.
Send/reply with an attachment.
@ MUTT_FORMAT_NONE
No flags are set.
Convenience wrapper for the send headers.
void mutt_make_misc_reply_headers(struct Envelope *env, struct Envelope *env_cur, struct ConfigSubset *sub)
Set subject for a reply.
void mutt_make_attribution_intro(struct Email *e, FILE *fp_out, struct ConfigSubset *sub)
Add "on DATE, PERSON wrote" header.
void mutt_forward_intro(struct Email *e, FILE *fp, struct ConfigSubset *sub)
Add the "start of forwarded message" text.
void mutt_make_forward_subject(struct Envelope *env, struct Email *e, struct ConfigSubset *sub)
Create a subject for a forwarded email.
void mutt_fix_reply_recipients(struct Envelope *env, struct ConfigSubset *sub)
Remove duplicate recipients.
int mutt_resend_message(FILE *fp, struct Mailbox *m, struct Email *e_cur, struct ConfigSubset *sub)
Resend an email.
int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, SendFlags flags, struct ConfigSubset *sub)
Generate recpients for a reply email.
void mutt_forward_trailer(struct Email *e, FILE *fp, struct ConfigSubset *sub)
Add a "end of forwarded message" text.
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.
void mutt_make_attribution_trailer(struct Email *e, FILE *fp_out, struct ConfigSubset *sub)
Add suffix to replied email text.
void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *env_cur, struct ConfigSubset *sub)
Generate references for a reply email.
@ SEND_NONE
No flags are set.
@ SEND_TO_SENDER
Compose new email to sender.
@ SEND_LIST_REPLY
Reply to mailing list.
@ SEND_NEWS
Reply to a news article.
int mutt_bounce_message(FILE *fp, struct Mailbox *m, struct Email *e, struct AddressList *to, struct ConfigSubset *sub)
Bounce an email message.
FILE * fp_root
Used by recvattach for updating.
struct AttachPtr ** idx
Array of attachments.
short idxlen
Number of attachmentes.
An email to which things will be attached.
struct Body * body
Attachment.
int level
Nesting depth of attachment.
FILE * fp
Used in the recvattach menu.
struct Email * email
header information for message/rfc822
char * subtype
content-type subtype
unsigned int type
content-type primary type, ContentType
String manipulation buffer.
The envelope/body of an email.
struct Envelope * env
Envelope information.
struct Body * body
List of MIME parts.
struct AddressList to
Email's 'To' list.
char * followup_to
List of 'followup-to' fields.
char * newsgroups
List of newsgroups.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Keep track when processing files.
StateFlags flags
Flags, e.g. STATE_DISPLAY.
FILE * fp_out
File to write to.
FILE * fp_in
File to read from.
const char * prefix
String to add to the beginning of each output line.
#define buf_mktemp_draft(buf)