83 #define CHECK_READONLY \ 84 if (!Context || !Context->mailbox || Context->mailbox->readonly) \ 87 mutt_error(_(Mailbox_is_read_only)); \ 91 #define CUR_ATTACH actx->idx[actx->v2r[menu->current]] 94 static const struct Mapping AttachHelp[] = {
96 {
N_(
"Exit"), OP_EXIT },
97 {
N_(
"Save"), OP_SAVE },
98 {
N_(
"Pipe"), OP_PIPE },
99 {
N_(
"Print"), OP_PRINT },
100 {
N_(
"Help"), OP_HELP },
106 N_(
"Function not permitted in attach-message mode");
108 #define CHECK_ATTACH \ 112 mutt_error(_(Function_not_permitted)); \ 124 int vindex, rindex, curlevel;
129 while (rindex < actx->idxlen)
131 actx->
v2r[vindex++] = rindex;
134 curlevel = actx->
idx[rindex]->
level;
138 }
while ((rindex < actx->idxlen) && (actx->
idx[rindex]->
level > curlevel));
158 for (
int vindex = 0; vindex < actx->
vcount; vindex++)
160 const int rindex = actx->
v2r[vindex];
161 actx->
idx[rindex]->
num = vindex;
162 if ((2 * (actx->
idx[rindex]->
level + 2)) <
sizeof(buf))
166 s = buf + 2 * (actx->
idx[rindex]->
level - 1);
184 if (((2 * (actx->
idx[rindex]->
level + 2)) <
sizeof(buf)) &&
187 s = buf + 2 * (actx->
idx[rindex]->
level - 1);
188 *s++ = (actx->
idx[rindex]->
body->
next) ?
'\005' :
'\006';
218 const char *src,
const char *prec,
const char *if_str,
249 snprintf(fmt,
sizeof(fmt),
"%%%sc", prec);
250 snprintf(buf, buflen, fmt,
325 snprintf(buf, buflen,
"%c", aptr->
body->
deleted ?
'D' :
' ');
337 const char dispchar[] = {
'I',
'A',
'F',
'-' };
348 snprintf(buf, buflen,
"%c", ch);
364 snprintf(fmt,
sizeof(fmt),
"%%%sd", prec);
365 snprintf(buf, buflen, fmt, aptr->
num + 1);
372 snprintf(fmt,
sizeof(fmt),
"%%%sc", prec);
401 snprintf(buf, buflen,
"%c", aptr->
body->
tagged ?
'*' :
' ');
408 else if (!aptr->
tree)
413 snprintf(buf, buflen,
"%c", aptr->
body->
unlink ?
'-' :
' ');
422 snprintf(fmt,
sizeof(fmt),
"%%%sd", prec);
474 if (!buf || !buf->
data || (buf->
data[0] ==
'/'))
481 if (tmp->
dptr[-1] !=
'/')
536 struct Body b_fake = { 0 };
550 memset(&b_fake, 0,
sizeof(
struct Body));
587 if (directory && *directory)
602 prompt =
_(
"Save to file: ");
624 prompt =
_(
"Save to file: ");
639 prompt =
_(
"Save to file: ");
646 (e || !is_message) ? e : body->
email) == 0)
654 prompt =
_(
"Save to file: ");
706 (e || !is_message) ? e : body->
email);
726 char *directory = NULL;
728 int last = menu ? menu->
current : -1;
730 int saved_attachments = 0;
735 for (
int i = 0; !tag || (i < actx->
idxlen); i++)
739 fp = actx->
idx[i]->
fp;
781 if (tag && menu && top->
aptr)
824 mutt_message(ngettext(
"Attachment saved",
"%d attachments saved", saved_attachments),
847 snprintf(warning,
sizeof(warning),
848 _(
"WARNING! You are about to overwrite %s, continue?"), body->
filename);
871 if (filter && tfile[0])
884 if (!state || !state->
fp_out)
888 FILE *fp_unstuff = NULL;
889 bool is_flowed =
false, unlink_unstuff =
false;
890 struct Buffer *unstuff_tempfile = NULL;
906 if (fp_unstuff == NULL)
911 unlink_unstuff =
true;
913 FILE *filter_fp = state->
fp_out;
914 state->
fp_out = fp_unstuff;
917 state->
fp_out = filter_fp;
920 if (fp_unstuff == NULL)
933 const char *infile = NULL;
939 unlink_unstuff =
true;
946 fp_in = fopen(infile,
"r");
979 FILE *fp,
bool tag,
struct Body *top,
980 bool filter,
struct State *state)
982 for (
int i = 0; !tag || (i < actx->
idxlen); i++)
986 fp = actx->
idx[i]->
fp;
1010 struct Body *top,
bool filter)
1012 struct State state = { 0 };
1013 struct Buffer *buf = NULL;
1060 for (
int i = 0; !tag || (i < actx->
idxlen); i++)
1064 snprintf(type,
sizeof(type),
"%s/%s",
TYPE(top), top->
subtype);
1076 mutt_error(
_(
"I don't know how to print %s attachments"), type);
1101 for (
int i = 0; !tag || (i < actx->
idxlen); i++)
1105 fp = actx->
idx[i]->
fp;
1110 snprintf(type,
sizeof(type),
"%s/%s",
TYPE(top), top->
subtype);
1132 "BUG in print_attachment_list(). Please report this. ");
1167 struct State state = { 0 };
1168 int tagmsgcount = 0;
1171 for (
int i = 0; i < actx->
idxlen; i++)
1175 snprintf(prompt,
sizeof(prompt),
1179 tag ? ngettext(
"Print tagged attachment?",
"Print %d tagged attachments?", tagmsgcount) :
1180 _(
"Print attachment?"),
1213 for (
int i = 0; i < actx->
idxlen; i++)
1239 for (
int i = 0; i < actx->
idxlen; i++)
1264 _(
"Structural changes to decrypted attachments are not supported"));
1268 for (
int i = 0; i < actx->
idxlen; i++)
1290 case OP_DISPLAY_HEADERS:
1294 case OP_VIEW_ATTACH:
1300 case OP_MAIN_NEXT_UNDELETED:
1304 op = OP_VIEW_ATTACH;
1310 case OP_MAIN_PREV_UNDELETED:
1314 op = OP_VIEW_ATTACH;
1329 op = OP_VIEW_ATTACH;
1332 case OP_CHECK_TRADITIONAL:
1339 case OP_ATTACH_COLLAPSE:
1346 }
while (op != OP_NULL);
1362 struct Body *parts, FILE *fp,
1363 int parent_type,
int level,
bool decrypted)
1365 struct Body *m = NULL;
1366 struct Body *new_body = NULL;
1367 FILE *fp_new = NULL;
1369 int need_secured, secured;
1371 for (m = parts; m; m = m->
next)
1383 goto decrypt_failed;
1399 goto decrypt_failed;
1402 if (secured && (type & SEC_ENCRYPT))
1412 goto decrypt_failed;
1420 if (need_secured && secured)
1430 if (need_secured && !secured)
1456 level + 1, decrypted);
1473 for (
int i = 0; i < actx->
idxlen; i++)
1518 int rindex, curlevel;
1528 while ((rindex < actx->idxlen) && (actx->
idx[rindex]->
level > curlevel))
1567 menu->
title =
_(
"Attachments");
1586 case OP_ATTACH_VIEW_MAILCAP:
1592 case OP_ATTACH_VIEW_TEXT:
1598 case OP_ATTACH_VIEW_PAGER:
1604 case OP_DISPLAY_HEADERS:
1605 case OP_VIEW_ATTACH:
1610 case OP_ATTACH_COLLAPSE:
1620 case OP_FORGET_PASSPHRASE:
1624 case OP_EXTRACT_KEYS:
1632 case OP_CHECK_TRADITIONAL:
1668 mutt_error(
_(
"Can't delete attachment from POP server"));
1677 mutt_error(
_(
"Can't delete attachment from news server"));
1684 mutt_message(
_(
"Deletion of attachments from encrypted messages is " 1690 mutt_message(
_(
"Deletion of attachments from signed messages may " 1691 "invalidate the signature"));
1709 _(
"Only deletion of multipart attachments is supported"));
1714 for (
int i = 0; i < menu->
max; i++)
1726 _(
"Only deletion of multipart attachments is supported"));
1748 for (
int i = 0; i < menu->
max; i++)
1766 case OP_BOUNCE_MESSAGE:
1773 case OP_FORWARD_MESSAGE:
1781 case OP_FORWARD_TO_GROUP:
1791 if (!
CUR_ATTACH->body->email->env->followup_to ||
1795 _(
"Reply by mail as poster prefers?")) !=
MUTT_YES))
1806 case OP_GROUP_REPLY:
1807 case OP_GROUP_CHAT_REPLY:
1813 if (op == OP_GROUP_REPLY)
1815 else if (op == OP_GROUP_CHAT_REPLY)
1817 else if (op == OP_LIST_REPLY)
1826 case OP_COMPOSE_TO_SENDER:
1842 for (
int i = 0; i < actx->
idxlen; i++)
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Convenience wrapper for the gui headers.
bool C_AttachSplit
Config: Save/print/pipe tagged messages individually.
void mutt_decode_attachment(struct Body *b, struct State *s)
Decode an email's attachment.
#define mutt_buffer_mktemp(buf)
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
char * filename
when sending a message, this is the file to which this structure refers
enum MailboxType type
Mailbox type.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
An email to which things will be attached.
Miscellaneous email parsing routines.
char * C_MessageFormat
Config: printf-like format string for listing attached messages.
pid_t filter_create(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err)
Set up filter program.
void mutt_make_string_flags(char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags)
Create formatted strings using mailbox expandos.
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
static bool has_a_message(struct Body *body)
Determine if the Body has a message (to save)
The envelope/body of an email.
#define state_puts(STATE, STR)
#define MUTT_CLEAR
Clear input if printable character is pressed.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
void mutt_actx_add_fp(struct AttachCtx *actx, FILE *fp_new)
Save a File handle to the Attachment Context.
static const struct Mapping AttachHelp[]
Help Bar for the Attachment selection dialog.
bool mutt_rfc3676_is_format_flowed(struct Body *b)
Is the Email "format-flowed"?
void mutt_update_encoding(struct Body *a, struct ConfigSubset *sub)
Update the encoding type.
struct Body * body
List of MIME parts.
static void attach_make_entry(char *buf, size_t buflen, struct Menu *menu, int line)
Format a menu item for the attachment list - Implements Menu::make_entry()
'NNTP' (Usenet) Mailbox type
#define MUTT_CHARCONV
Do character set conversions.
Structs that make up an email.
String processing routines to generate the mail index.
size_t mutt_buffer_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
void mutt_generate_recvattach_list(struct AttachCtx *actx, struct Email *e, struct Body *parts, FILE *fp, int parent_type, int level, bool decrypted)
Create a list of attachments.
The "currently-open" mailbox.
static const char * Mailbox_is_read_only
Convenience wrapper for the send headers.
const char * mutt_path_basename(const char *f)
Find the last component for a pathname.
#define mutt_message(...)
int help_menu
Menu for key bindings, e.g. MENU_PAGER.
Attach Dialog, dlg_select_attachment()
struct Email * email
Used by recvattach for updating.
int mutt_file_rename(const char *oldfile, const char *newfile)
Rename a file.
char * C_AttachSaveWithoutPrompting
Config: If true, then don't prompt to save.
#define SEC_ENCRYPT
Email is encrypted.
void mutt_flushinp(void)
Empty all the keyboard buffers.
char * C_AttachSep
Config: Separator to add between saved/printed/piped attachments.
bool attach_del
Has an attachment marked for deletion.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
bool noconv
Don't do character set conversion.
static void prepend_savedir(struct Buffer *buf)
Add $attach_save_dir to the beginning of a path.
void crypt_forget_passphrase(void)
Forget a passphrase and display a message.
void mutt_file_unlink(const char *s)
Delete a file, carefully.
RFC1524 Mailcap routines.
static void print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top, struct State *state)
Print a list of Attachments.
FILE * fp_root
Used by recvattach for updating.
String manipulation buffer.
bool C_DigestCollapse
Config: Hide the subparts of a multipart/digest.
void mutt_parse_mime_message(struct Mailbox *m, struct Email *e)
Parse a MIME email.
char * mutt_str_dup(const char *str)
Copy a string, safely.
bool changed
Email has been edited.
struct Body * next
next attachment in the list
short idxlen
Number of attachmentes.
FILE * fp_out
File to write to.
A division of the screen.
void mutt_actx_add_attach(struct AttachCtx *actx, struct AttachPtr *attach)
Add an Attachment to an Attachment Context.
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
#define MUTT_MESSAGE_HOOK
message-hook: run before displaying a message
static int query_save_attachment(FILE *fp, struct Body *body, struct Email *e, char **directory)
Ask the user if we should save the attachment.
#define MUTT_PRINTING
Are we printing? - MUTT_DISPLAY "light".
int mutt_save_attachment(FILE *fp, struct Body *m, const char *path, enum SaveAttach opt, struct Email *e)
Save an attachment.
View using default method.
uint16_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
void mutt_default_save(char *path, size_t pathlen, struct Email *e)
Find the default save path for an email.
All user-callable functions.
Container for Accounts, Notifications.
FILE * fp_in
File to read from.
void mutt_buffer_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
struct MuttWindow * dialog_create_simple_index(struct Menu *menu, enum WindowType type)
Create a simple index Dialog.
int mutt_save_confirm(const char *s, struct stat *st)
Ask the user to save.
unsigned int disposition
content-disposition, ContentDisposition
Convenience wrapper for the config headers.
bool mailcap_lookup(struct Body *a, char *type, size_t typelen, struct MailcapEntry *entry, enum MailcapLookup opt)
Find given type in the list of mailcap files.
int attach_tag(struct Menu *menu, int sel, int act)
Tag an attachment - Implements Menu::tag()
char * tree
Tree characters to display.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
#define SEND_NO_FLAGS
No flags are set.
Some miscellaneous functions.
void mutt_attach_reply(FILE *fp, struct Email *e, struct AttachCtx *actx, struct Body *e_cur, SendFlags flags)
Attach a reply.
StateFlags flags
Flags, e.g. MUTT_DISPLAY.
int mx_msg_close(struct Mailbox *m, struct Message **msg)
Close a message.
bool crypt_valid_passphrase(SecurityFlags flags)
Check that we have a usable passphrase, ask if not.
size_t dsize
Length of data.
bool attach_qualifies
This attachment should be counted.
void mutt_sleep(short s)
Sleep for a while.
enum QuadOption mutt_yesorno(const char *msg, enum QuadOption def)
Ask the user a Yes/No question.
Parse and execute user-defined hooks.
SecurityFlags mutt_is_multipart_encrypted(struct Body *b)
Does the message have encrypted parts?
Many unsorted constants and some structs.
void mutt_window_clearline(struct MuttWindow *win, int row)
Clear a row of a Window.
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
struct Envelope * env
Envelope information.
Convenience wrapper for the core headers.
char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
Get a body's character set.
signed short attach_count
Number of attachments.
int bool_str_toggle(struct ConfigSubset *sub, const char *name, struct Buffer *err)
Toggle the value of a bool.
struct AttachCtx * mutt_actx_new(void)
Create a new Attachment Context.
#define SEND_LIST_REPLY
Reply to mailing list.
bool tagged
This attachment is tagged.
unsigned int encoding
content-transfer-encoding, ContentEncoding
WHERE char * C_PrintCommand
Config: External command to print a message.
void crypt_pgp_extract_key_from_attachment(FILE *fp, struct Body *top)
Wrapper for CryptModuleSpecs::pgp_extract_key_from_attachment()
Usenet network mailbox type; talk to an NNTP server.
size_t mutt_buffer_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
void mutt_buffer_fix_dptr(struct Buffer *buf)
Move the dptr to end of the Buffer.
bool collapsed
Used by recvattach.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * subtype
content-type subtype
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
#define MUTT_CMD
Do completion on previous word.
static void mutt_update_v2r(struct AttachCtx *actx)
Update the virtual list of attachments.
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
bool decrypted
Not part of message as stored in the email->body.
void mutt_attach_bounce(struct Mailbox *m, FILE *fp, struct AttachCtx *actx, struct Body *cur)
Bounce function, from the attachment menu.
#define mutt_mktemp(buf, buflen)
struct WindowState state
Current state of the Window.
#define APPLICATION_PGP
Use PGP to encrypt/sign.
static int save_without_prompting(FILE *fp, struct Body *body, struct Email *e)
Save the attachment, without prompting each time.
'POP3' Mailbox type
struct MuttWindow * MessageWindow
Message Window, ":set", etc.
A local copy of an email.
void mutt_endwin(void)
Shutdown curses/slang.
Create/manipulate threading in emails.
LOFF_T length
length (in bytes) of attachment
size_t mutt_buffer_len(const struct Buffer *buf)
Calculate the length of a Buffer.
static void recvattach_edit_content_type(struct AttachCtx *actx, struct Menu *menu, struct Email *e)
Edit the content type of an attachment.
int mutt_attach_display_loop(struct Menu *menu, int op, struct Email *e, struct AttachCtx *actx, bool recv)
Event loop for the Attachment menu.
int num
Attachment index number.
void mutt_attach_init(struct AttachCtx *actx)
Create a new Attachment context.
static void recvattach_extract_pgp_keys(struct AttachCtx *actx, struct Menu *menu)
Extract PGP keys from attachments.
int mutt_decode_save_attachment(FILE *fp, struct Body *m, const char *path, int displaying, enum SaveAttach opt)
Decode, then save an attachment.
Manage where the email is piped to external commands.
struct AttachPtr * aptr
Menu information, used in recvattach.c.
char * dptr
Current read/write position.
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
void crypt_smime_getkeys(struct Envelope *env)
Wrapper for CryptModuleSpecs::smime_getkeys()
bool mutt_can_decode(struct Body *a)
Will decoding the attachment produce any output.
const struct Mapping * help_data
Data for the Help Bar.
char * data
Pointer to data.
void dialog_destroy_simple_index(struct MuttWindow **ptr)
Destroy a simple index Dialog.
struct Body * parts
parts of a multipart or message/rfc822
static void query_pipe_attachment(const char *command, FILE *fp, struct Body *body, bool filter)
Ask the user if we should pipe the attachment.
static void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
Update the Attachment Menu.
char * C_AttachSaveDir
Config: Default directory where attachments are saved.
RFC3676 Format Flowed routines.
static void pipe_attachment_list(const char *command, struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top, bool filter, struct State *state)
Pipe a list of attachments to a command.
FILE * fp
Used in the recvattach menu.
API for encryption/signing of emails.
SecurityFlags mutt_is_malformed_multipart_pgp_encrypted(struct Body *b)
Check for malformed layout.
int crypt_smime_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Wrapper for CryptModuleSpecs::decrypt_mime()
void mutt_rfc3676_space_unstuff_attachment(struct Body *b, const char *filename)
Unstuff attachments.
void mutt_body_free(struct Body **ptr)
Free a Body.
#define SEND_NEWS
Reply to a news article.
SecurityFlags mutt_is_application_smime(struct Body *m)
Does the message use S/MIME?
static void pipe_attachment(FILE *fp, struct Body *b, struct State *state)
Pipe the attachment to a command.
Handling of email attachments.
void dlg_select_attachment(struct Email *e)
Show the attachments in a Menu.
char * description
content-description
bool mutt_is_text_part(struct Body *b)
Is this part of an email in plain text?
size_t mutt_buffer_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib...
static int recvattach_pgp_check_traditional(struct AttachCtx *actx, struct Menu *menu)
Is the Attachment inline PGP?
static bool can_print(struct AttachCtx *actx, struct Body *top, bool tag)
Do we know how to print this attachment type?
View attachment in pager using copiousoutput mailcap.
Force viewing using mailcap entry.
#define SEND_REPLY
Reply to sender.
#define MUTT_FILE
Do file completion.
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
unsigned int type
content-type primary type, ContentType
int mutt_check_overwrite(const char *attname, const char *path, struct Buffer *fname, enum SaveAttach *opt, char **directory)
Ask the user if overwriting is necessary.
#define mutt_buffer_get_field(field, buf, complete)
void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top)
Print a list of Attachments.
void mutt_attach_forward(FILE *fp, struct Email *e, struct AttachCtx *actx, struct Body *cur, SendFlags flags)
Forward an Attachment.
#define SEC_SIGN
Email is signed.
int crypt_pgp_check_traditional(FILE *fp, struct Body *b, bool just_one)
Wrapper for CryptModuleSpecs::pgp_check_traditional()
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
Keep track when processing files.
bool deleted
Attachment marked for deletion.
static void attach_collapse(struct AttachCtx *actx, struct Menu *menu)
Close the tree of the current attachment.
enum QuadOption query_quadoption(enum QuadOption opt, const char *prompt)
Ask the user a quad-question.
void mutt_actx_entries_free(struct AttachCtx *actx)
Free entries in an Attachment Context.
#define SEND_GROUP_REPLY
Reply to all.
int crypt_pgp_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Wrapper for CryptModuleSpecs::decrypt_mime()
Type: 'multipart/*'.
void mutt_buffer_expand_path(struct Buffer *buf)
Create the canonical path.
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string.
Routines for managing attachments.
Send/reply with an attachment.
static int save_attachment_flowed_helper(FILE *fp, struct Body *b, const char *path, enum SaveAttach flags, struct Email *e)
Helper for unstuffing attachments.
int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
Copy the contents of one file into another.
short * v2r
Mapping from virtual to real attachment.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string.
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
void mutt_update_tree(struct AttachCtx *actx)
Refresh the list of attachments.
FILE * fp
pointer to the message data
void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top, struct Email *e, struct Menu *menu)
Save a list of attachments.
const char * attach_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, intptr_t data, MuttFormatFlags flags)
Format a string for the attachment menu - Implements format_t.
size_t mutt_buffer_concat_path(struct Buffer *buf, const char *dir, const char *fname)
Join a directory name and a filename.
Mapping between user-readable string and a constant.
WHERE char * C_AttachFormat
Config: printf-like format string for the attachment menu.
Keep track when processing files.
void mutt_attach_mail_sender(FILE *fp, struct Email *e, struct AttachCtx *actx, struct Body *cur)
Compose an email to the sender in the email attachment.
User answered 'No', or assume 'No'.
void window_redraw(struct MuttWindow *win, bool force)
Reflow, recalc and repaint a tree of Windows.
char * d_filename
filename to be used for the content-disposition header.
#define PGP_TRADITIONAL_CHECKED
Email has a traditional (inline) signature.
Hundreds of global variables to back the user variables.
Handling of global boolean variables.
#define mutt_debug(LEVEL,...)
struct ConfigSubset * sub
Inherited config items.
void mutt_message_hook(struct Mailbox *m, struct Email *e, HookFlags type)
Perform a message hook.
WHERE unsigned char C_Print
Config: Confirm before printing a message.
#define SEND_GROUP_CHAT_REPLY
Reply to all recipients preserving To/Cc.
static const char * Function_not_permitted
bool mutt_edit_content_type(struct Email *e, struct Body *b, FILE *fp)
Edit the content type of an attachment.
Convenience wrapper for the library headers.
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
bool mutt_buffer_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Decide how to display email content.
struct Email * email
header information for message/rfc822
int level
Nesting depth of attachment.
struct AttachPtr ** idx
Array of attachments.
SecurityFlags crypt_query(struct Body *m)
Check out the type of encryption used.
void mutt_attach_resend(FILE *fp, struct AttachCtx *actx, struct Body *cur)
resend-message, from the attachment menu
int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfile)
Pipe an attachment to a command.
struct Message * mx_msg_open(struct Mailbox *m, int msgno)
return a stream pointer for a message
#define SEC_PARTSIGN
Not all parts of the email is signed.
void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top, bool filter)
Pipe a list of attachments to a command.
unsigned char C_FollowupToPoster
Config: (nntp) Reply to the poster if 'poster' is in the 'Followup-To' header.
WHERE bool C_Resolve
Config: Move to the next email whenever a command modifies an email.
void mutt_actx_add_body(struct AttachCtx *actx, struct Body *new_body)
Add an email box to an Attachment Context.
void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string with tree characters.
short vcount
The number of virtual attachments.
int msgno
Number displayed to the user.
SaveAttach
Options for saving attachments.
User answered 'Yes', or assume 'Yes'.
int mutt_view_attachment(FILE *fp, struct Body *a, enum ViewAttachMode mode, struct Email *e, struct AttachCtx *actx, struct MuttWindow *win)
View an attachment.
WHERE bool C_WaitKey
Config: Prompt to press a key after running external commands.
int mutt_print_attachment(FILE *fp, struct Body *a)
Print out an attachment.
struct Body * body
Attachment.