77 mutt_error(
_(
"You may only bounce message/rfc822 parts"));
96 for (
short i = 0; i < actx->
idxlen; i++)
119 for (
short i = 0; i < actx->
idxlen; i++)
134 for (
short i = 0; i < actx->
idxlen; i++)
152 while ((++i < actx->idxlen) && (level < actx->idx[i]->level))
169 if (!m || !fp || !actx)
185 mutt_error(
_(
"Warning: message contains no From: header"));
191 for (
short i = 0; i < actx->
idxlen; i++)
197 mutt_error(
_(
"Warning: message contains no From: header"));
210 buf_strcpy(prompt,
_(
"Bounce tagged messages to: "));
240 buf_printf(prompt, ngettext(
"Bounce message to %s?",
"Bounce messages to %s?", num_msg),
246 mutt_message(ngettext(
"Message not bounced",
"Messages not bounced", num_msg));
259 for (
short i = 0; i < actx->
idxlen; i++)
273 mutt_message(ngettext(
"Message bounced",
"Messages bounced", num_msg));
275 mutt_error(ngettext(
"Error bouncing message",
"Error bouncing messages", num_msg));
301 for (
short i = 0; i < actx->
idxlen; i++)
324 for (i = 0; i < actx->
idxlen; i++)
333 if (nchildren == nattach)
357 while ((++i < actx->idxlen) && (actx->
idx[i]->
level >
level))
380 for (
short i = 0; i < actx->
idxlen; i++)
385 parent = actx->
idx[i];
408 FILE *fp_out,
const char *prefix)
424 else if (!c_text_flowed)
428 setlocale(LC_TIME,
NONULL(c_attribution_locale));
430 setlocale(LC_TIME,
"");
456 for (
short i = 0; i < actx->
idxlen; i++)
462 last = &((*last)->next);
479 struct Body *b,
short nattach)
481 bool mime_fwd_all =
false;
482 bool mime_fwd_any =
true;
483 struct Email *e_parent = NULL;
484 FILE *fp_parent = NULL;
486 struct Buffer *tmpbody = NULL;
496 fp_parent = parent->
fp;
534 setlocale(LC_TIME,
NONULL(c_attribution_locale));
537 setlocale(LC_TIME,
"");
562 ans =
query_quadoption(
_(
"Can't decode all tagged attachments. MIME-forward the others?"),
567 mime_fwd_any =
false;
572 struct State state = { 0 };
606 for (
int i = 0; i < actx->
idxlen; i++)
664 struct Email *e_cur = NULL;
665 struct Email *e_tmp = NULL;
667 struct Body **last = NULL;
668 struct Buffer *tmpbody = NULL;
679 for (
short i = 0; i < actx->
idxlen; i++)
717 if (c_forward_decode)
736 for (
short i = 0; i < actx->
idxlen; i++)
758 for (
short i = 0; i < actx->
idxlen; i++)
763 last = &((*last)->next);
830 struct Email *e = NULL;
834 curenv = parent->
env;
839 for (
short i = 0; i < actx->
idxlen; i++)
873 for (
short i = 0; i < actx->
idxlen; i++)
900 for (
short i = 0; i < actx->
idxlen; i++)
952 bool mime_reply_any =
false;
956 struct Email *e_parent = NULL;
957 FILE *fp_parent = NULL;
958 struct Email *e_tmp = NULL;
960 struct Buffer *tmpbody = NULL;
977 fp_parent = parent->
fp;
993 mime_reply_any =
true;
995 else if (nattach == 1)
997 mime_reply_any =
true;
1004 e_parent ? e_parent : (b ? b->
email : NULL),
1023 struct State state = { 0 };
1035 setlocale(LC_TIME,
NONULL(c_attribution_locale));
1038 setlocale(LC_TIME,
"");
1067 for (
short i = 0; i < actx->
idxlen; i++)
1093 for (
short i = 0; i < actx->
idxlen; i++)
1133 mutt_error(
_(
"You may only compose to sender with message/rfc822 parts"));
1150 for (
int i = 0; i < actx->
idxlen; i++)
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_FREE(head)
Release all memory.
#define ARRAY_HEAD_INITIALIZER
Static initializer for arrays.
GUI display the mailboxes in a side panel.
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_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.
Duplicate the structure of an entire email.
#define CH_DECODE
Do RFC2047 header decoding.
#define MUTT_CM_WEED
Weed message/rfc822 attachment headers.
#define MUTT_CM_PREFIX
Quote the header and body.
#define CH_PREFIX
Quote header using $indent_string string?
#define MUTT_CM_DECODE
Decode the message body into text/plain.
#define CH_WEED
Weed the headers?
#define CH_REORDER
Re-order output of headers (specified by 'hdr_order')
#define MUTT_CM_CHARCONV
Perform character set conversions.
uint32_t CopyHeaderFlags
Flags for mutt_copy_header(), e.g. CH_UPDATE.
#define MUTT_CM_NO_FLAGS
No flags are set.
#define MUTT_CM_NOHEADER
Don't copy the message header.
uint16_t CopyMessageFlags
Flags for mutt_copy_message(), e.g. MUTT_CM_NOHEADER.
Convenience wrapper for the core headers.
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.
Decide how to display email content.
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.
String processing routines to generate the mail index.
Read/write command history from/to a file.
void msgwin_clear_text(struct MuttWindow *win)
Clear the text in the Message Window.
Convenience wrapper for the library headers.
#define STATE_WEED
Weed headers even when not in display mode.
#define state_putc(STATE, STR)
#define STATE_CHARCONV
Do character set conversions.
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.
#define MUTT_COMP_NO_FLAGS
No flags are set.
@ MUTT_REPLIED
Messages that have been replied to.
int mutt_body_copy(FILE *fp, struct Body **b_dst, struct Body *b_src)
Create a send-mode duplicate from a receive-mode body.
Representation of the body of an email.
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.
Prototypes for many functions.
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()
static struct Body ** copy_problematic_attachments(struct Body **last, struct AttachCtx *actx, bool force)
Attach the body parts which can't be decoded.
static bool check_can_decode(struct AttachCtx *actx, struct Body *b)
Can we decode all tagged attachments?
static void attach_forward_bodies(FILE *fp, struct Email *e, struct AttachCtx *actx, struct Body *b, short nattach)
Forward one or several MIME bodies.
static short count_tagged(struct AttachCtx *actx)
Count the number of tagged attachments.
static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx, struct Body *b, SendFlags flags)
Forward one or several message-type attachments.
static short count_tagged_children(struct AttachCtx *actx, short i)
Tagged children below a multipart/message attachment.
static struct AttachPtr * find_parent(struct AttachCtx *actx, struct Body *b, short nattach)
Find the parent of an Attachment.
static struct AttachPtr * find_common_parent(struct AttachCtx *actx, short nattach)
Find a common parent message for the tagged attachments.
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_resend(FILE *fp, struct Mailbox *m, struct AttachCtx *actx, struct Body *b)
Resend-message, from the attachment menu.
void mutt_attach_mail_sender(struct AttachCtx *actx, struct Body *b)
Compose an email to the sender in the email attachment.
void mutt_attach_forward(FILE *fp, struct Email *e, struct AttachCtx *actx, struct Body *b, SendFlags flags)
Forward an Attachment.
void attach_bounce_message(struct Mailbox *m, FILE *fp, struct AttachCtx *actx, struct Body *b)
Bounce function, from the attachment menu.
static int attach_reply_envelope_defaults(struct Envelope *env, struct AttachCtx *actx, struct Email *parent, SendFlags flags)
Create the envelope defaults for a reply.
void mutt_attach_reply(FILE *fp, struct Mailbox *m, struct Email *e, struct AttachCtx *actx, struct Body *b, SendFlags flags)
Attach a reply.
static bool check_msg(struct Body *b, bool err)
Are we working with an RFC822 message.
static bool check_all_msg(struct AttachCtx *actx, struct Body *b, bool err)
Are all the Attachments RFC822 messages?
Send/reply with an attachment.
#define MUTT_FORMAT_NO_FLAGS
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.
uint32_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
#define SEND_LIST_REPLY
Reply to mailing list.
#define SEND_TO_SENDER
Compose new email to sender.
#define SEND_NO_FLAGS
No flags are set.
#define 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
bool tagged
This attachment is tagged.
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.
struct AddressList from
Email's 'From' list.
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.