NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
Attachment Function API

Prototype for an Attachment Function. More...

+ Collaboration diagram for Attachment Function API:

Functions

static int op_attachment_collapse (struct AttachPrivateData *priv, const struct KeyEvent *event)
 toggle display of subparts - Implements attach_function_t -
 
static int op_attachment_delete (struct AttachPrivateData *priv, const struct KeyEvent *event)
 delete the current entry - Implements attach_function_t -
 
static int op_attachment_edit_type (struct AttachPrivateData *priv, const struct KeyEvent *event)
 edit attachment content type - Implements attach_function_t -
 
static int op_attachment_pipe (struct AttachPrivateData *priv, const struct KeyEvent *event)
 pipe message/attachment to a shell command - Implements attach_function_t -
 
static int op_attachment_print (struct AttachPrivateData *priv, const struct KeyEvent *event)
 print the current entry - Implements attach_function_t -
 
static int op_attachment_save (struct AttachPrivateData *priv, const struct KeyEvent *event)
 save message/attachment to a mailbox/file - Implements attach_function_t -
 
static int op_attachment_undelete (struct AttachPrivateData *priv, const struct KeyEvent *event)
 undelete the current entry - Implements attach_function_t -
 
static int op_attachment_view (struct AttachPrivateData *priv, const struct KeyEvent *event)
 view attachment using mailcap entry if necessary - Implements attach_function_t -
 
static int op_attachment_view_mailcap (struct AttachPrivateData *priv, const struct KeyEvent *event)
 force viewing of attachment using mailcap - Implements attach_function_t -
 
static int op_attachment_view_pager (struct AttachPrivateData *priv, const struct KeyEvent *event)
 view attachment in pager using copiousoutput mailcap - Implements attach_function_t -
 
static int op_attachment_view_text (struct AttachPrivateData *priv, const struct KeyEvent *event)
 view attachment as text - Implements attach_function_t -
 
static int op_bounce_message (struct AttachPrivateData *priv, const struct KeyEvent *event)
 remail a message to another user - Implements attach_function_t -
 
static int op_check_traditional (struct AttachPrivateData *priv, const struct KeyEvent *event)
 check for classic PGP - Implements attach_function_t -
 
static int op_compose_to_sender (struct AttachPrivateData *priv, const struct KeyEvent *event)
 compose new message to the current message sender - Implements attach_function_t -
 
static int op_exit (struct AttachPrivateData *priv, const struct KeyEvent *event)
 exit this menu - Implements attach_function_t -
 
static int op_extract_keys (struct AttachPrivateData *priv, const struct KeyEvent *event)
 extract supported public keys - Implements attach_function_t -
 
static int op_forget_passphrase (struct AttachPrivateData *priv, const struct KeyEvent *event)
 wipe passphrases from memory - Implements attach_function_t -
 
static int op_forward_message (struct AttachPrivateData *priv, const struct KeyEvent *event)
 forward a message with comments - Implements attach_function_t -
 
static int op_list_subscribe (struct AttachPrivateData *priv, const struct KeyEvent *event)
 subscribe to a mailing list - Implements attach_function_t -
 
static int op_list_unsubscribe (struct AttachPrivateData *priv, const struct KeyEvent *event)
 unsubscribe from a mailing list - Implements attach_function_t -
 
static int op_reply (struct AttachPrivateData *priv, const struct KeyEvent *event)
 reply to a message - Implements attach_function_t -
 
static int op_resend (struct AttachPrivateData *priv, const struct KeyEvent *event)
 use the current message as a template for a new one - Implements attach_function_t -
 
static int op_followup (struct AttachPrivateData *priv, const struct KeyEvent *event)
 followup to newsgroup - Implements attach_function_t -
 
static int op_forward_to_group (struct AttachPrivateData *priv, const struct KeyEvent *event)
 forward to newsgroup - Implements attach_function_t -
 

Detailed Description

Prototype for an Attachment Function.

Parameters
privPrivate Attach data
eventEvent to process
Return values
enumFunctionRetval
Precondition
priv is not NULL
event is not NULL

Function Documentation

◆ op_attachment_collapse()

static int op_attachment_collapse ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

toggle display of subparts - Implements attach_function_t -

Definition at line 267 of file functions.c.

268{
269 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
270 if (!cur_att->body->parts)
271 {
272 mutt_error(_("There are no subparts to show"));
273 return FR_NO_ACTION;
274 }
275 attach_collapse(priv->actx, priv->menu);
276 mutt_update_recvattach_menu(priv->actx, priv->menu, false);
277 return FR_SUCCESS;
278}
static void attach_collapse(struct AttachCtx *actx, struct Menu *menu)
Close the tree of the current attachment.
Definition functions.c:147
@ FR_SUCCESS
Valid function - successfully performed.
Definition dispatcher.h:40
@ FR_NO_ACTION
Valid function - no action performed.
Definition dispatcher.h:38
#define mutt_error(...)
Definition logging2.h:94
#define _(a)
Definition message.h:28
void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
Update the Attachment Menu.
struct AttachPtr * current_attachment(struct AttachCtx *actx, struct Menu *menu)
Get the current attachment.
Definition recvattach.c:71
struct Menu * menu
Current Menu.
struct AttachCtx * actx
List of all Attachments.
An email to which things will be attached.
Definition attach.h:35
struct Body * body
Attachment.
Definition attach.h:36
struct Body * parts
parts of a multipart or message/rfc822
Definition body.h:73
+ Here is the call graph for this function:

◆ op_attachment_delete()

static int op_attachment_delete ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

delete the current entry - Implements attach_function_t -

Definition at line 283 of file functions.c.

284{
285 if (check_readonly(priv->mailbox))
286 return FR_ERROR;
287
288 if (priv->mailbox->type == MUTT_POP)
289 {
291 mutt_error(_("Can't delete attachment from POP server"));
292 return FR_ERROR;
293 }
294
295 if (priv->mailbox->type == MUTT_NNTP)
296 {
298 mutt_error(_("Can't delete attachment from news server"));
299 return FR_ERROR;
300 }
301
302 if ((WithCrypto != 0) && (priv->actx->email->security & SEC_ENCRYPT))
303 {
304 mutt_message(_("Deletion of attachments from encrypted messages is unsupported"));
305 return FR_ERROR;
306 }
307 if ((WithCrypto != 0) && (priv->actx->email->security & (SEC_SIGN | SEC_PARTSIGN)))
308 {
309 mutt_message(_("Deletion of attachments from signed messages may invalidate the signature"));
310 }
311
312 if (priv->menu->tag_prefix)
313 {
314 for (int i = 0; i < priv->menu->max; i++)
315 {
316 if (priv->actx->idx[i]->body->tagged)
317 {
318 if (priv->actx->idx[i]->parent_type == TYPE_MULTIPART)
319 {
320 priv->actx->idx[i]->body->deleted = true;
322 }
323 else
324 {
325 mutt_message(_("Only deletion of multipart attachments is supported"));
326 }
327 }
328 }
329 }
330 else
331 {
332 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
333 if (cur_att->parent_type == TYPE_MULTIPART)
334 {
335 cur_att->body->deleted = true;
336 const bool c_resolve = cs_subset_bool(NeoMutt->sub, "resolve");
337 const int index = menu_get_index(priv->menu) + 1;
338 if (c_resolve && (index < priv->menu->max))
339 {
340 menu_set_index(priv->menu, index);
341 }
342 else
343 {
345 }
346 }
347 else
348 {
349 mutt_message(_("Only deletion of multipart attachments is supported"));
350 }
351 }
352
353 return FR_SUCCESS;
354}
static bool check_readonly(struct Mailbox *m)
Check if the Mailbox is readonly.
Definition functions.c:199
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition helpers.c:47
@ MUTT_POP
'POP3' Mailbox type
Definition mailbox.h:51
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
Definition mailbox.h:48
@ FR_ERROR
Valid function - error occurred.
Definition dispatcher.h:39
void mutt_flushinp(void)
Empty all the keyboard buffers.
Definition get.c:65
#define mutt_message(...)
Definition logging2.h:93
#define MENU_REDRAW_INDEX
Redraw the index.
Definition lib.h:57
void menu_queue_redraw(struct Menu *menu, MenuRedrawFlags redraw)
Queue a request for a redraw.
Definition menu.c:188
int menu_get_index(struct Menu *menu)
Get the current selection in the Menu.
Definition menu.c:164
#define MENU_REDRAW_CURRENT
Redraw the current line of the menu.
Definition lib.h:59
MenuRedrawFlags menu_set_index(struct Menu *menu, int index)
Set the current selection in the Menu.
Definition menu.c:178
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition mime.h:37
#define SEC_PARTSIGN
Not all parts of the email is signed.
Definition lib.h:90
#define SEC_ENCRYPT
Email is encrypted.
Definition lib.h:86
#define WithCrypto
Definition lib.h:124
#define SEC_SIGN
Email is signed.
Definition lib.h:87
struct Email * email
Used by recvattach for updating.
Definition attach.h:64
struct AttachPtr ** idx
Array of attachments.
Definition attach.h:67
struct Mailbox * mailbox
Current Mailbox.
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition attach.h:38
bool deleted
Attachment marked for deletion.
Definition body.h:88
bool tagged
This attachment is tagged.
Definition body.h:90
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition email.h:43
enum MailboxType type
Mailbox type.
Definition mailbox.h:101
bool tag_prefix
User has pressed <tag-prefix>
Definition lib.h:86
int max
Number of entries in the menu.
Definition lib.h:82
Container for Accounts, Notifications.
Definition neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49
+ Here is the call graph for this function:

◆ op_attachment_edit_type()

static int op_attachment_edit_type ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

edit attachment content type - Implements attach_function_t -

Definition at line 359 of file functions.c.

360{
361 recvattach_edit_content_type(priv->actx, priv->menu, priv->actx->email);
363 return FR_SUCCESS;
364}
void recvattach_edit_content_type(struct AttachCtx *actx, struct Menu *menu, struct Email *e)
Edit the content type of an attachment.
Definition recvattach.c:929
+ Here is the call graph for this function:

◆ op_attachment_pipe()

static int op_attachment_pipe ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

pipe message/attachment to a shell command - Implements attach_function_t -

Definition at line 369 of file functions.c.

370{
371 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
372 mutt_pipe_attachment_list(priv->actx, cur_att->fp, priv->menu->tag_prefix,
373 cur_att->body, false);
374 return FR_SUCCESS;
375}
void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *b, bool filter)
Pipe a list of attachments to a command.
Definition recvattach.c:718
FILE * fp
Used in the recvattach menu.
Definition attach.h:37
+ Here is the call graph for this function:

◆ op_attachment_print()

static int op_attachment_print ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

print the current entry - Implements attach_function_t -

Definition at line 380 of file functions.c.

381{
382 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
383 mutt_print_attachment_list(priv->actx, cur_att->fp, priv->menu->tag_prefix,
384 cur_att->body);
385 return FR_SUCCESS;
386}
void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *b)
Print a list of Attachments.
Definition recvattach.c:884
+ Here is the call graph for this function:

◆ op_attachment_save()

static int op_attachment_save ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

save message/attachment to a mailbox/file - Implements attach_function_t -

Definition at line 391 of file functions.c.

392{
393 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
394 mutt_save_attachment_list(priv->actx, cur_att->fp, priv->menu->tag_prefix,
395 cur_att->body, priv->actx->email, priv->menu);
396
397 const bool c_resolve = cs_subset_bool(NeoMutt->sub, "resolve");
398 const int index = menu_get_index(priv->menu) + 1;
399 if (!priv->menu->tag_prefix && c_resolve && (index < priv->menu->max))
400 menu_set_index(priv->menu, index);
401 return FR_SUCCESS;
402}
void mutt_save_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *b, struct Email *e, struct Menu *menu)
Save a list of attachments.
Definition recvattach.c:426
+ Here is the call graph for this function:

◆ op_attachment_undelete()

static int op_attachment_undelete ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

undelete the current entry - Implements attach_function_t -

Definition at line 407 of file functions.c.

408{
409 if (check_readonly(priv->mailbox))
410 return FR_ERROR;
411
412 if (priv->menu->tag_prefix)
413 {
414 for (int i = 0; i < priv->menu->max; i++)
415 {
416 if (priv->actx->idx[i]->body->tagged)
417 {
418 priv->actx->idx[i]->body->deleted = false;
420 }
421 }
422 }
423 else
424 {
425 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
426 cur_att->body->deleted = false;
427 const bool c_resolve = cs_subset_bool(NeoMutt->sub, "resolve");
428 const int index = menu_get_index(priv->menu) + 1;
429 if (c_resolve && (index < priv->menu->max))
430 {
431 menu_set_index(priv->menu, index);
432 }
433 else
434 {
436 }
437 }
438
439 return FR_SUCCESS;
440}
+ Here is the call graph for this function:

◆ op_attachment_view()

static int op_attachment_view ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

view attachment using mailcap entry if necessary - Implements attach_function_t -

Definition at line 445 of file functions.c.

446{
447 priv->op = mutt_attach_display_loop(priv->sub, priv->menu, event->op,
448 priv->actx->email, priv->actx, true);
450
451 return FR_CONTINUE;
452}
@ FR_CONTINUE
Remain in the Dialog.
Definition dispatcher.h:35
#define MENU_REDRAW_FULL
Redraw everything.
Definition lib.h:60
int mutt_attach_display_loop(struct ConfigSubset *sub, struct Menu *menu, int op, struct Email *e, struct AttachCtx *actx, bool recv)
Event loop for the Attachment menu.
Definition recvattach.c:959
int op
Op returned from the Pager, e.g. OP_NEXT_ENTRY.
struct ConfigSubset * sub
Config subset.
int op
Function opcode, e.g. OP_HELP.
Definition get.h:52
+ Here is the call graph for this function:

◆ op_attachment_view_mailcap()

static int op_attachment_view_mailcap ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

force viewing of attachment using mailcap - Implements attach_function_t -

Definition at line 457 of file functions.c.

459{
460 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
461 mutt_view_attachment(cur_att->fp, cur_att->body, MUTT_VA_MAILCAP,
462 priv->actx->email, priv->actx, priv->menu->win);
464 return FR_SUCCESS;
465}
int mutt_view_attachment(FILE *fp, struct Body *b, enum ViewAttachMode mode, struct Email *e, struct AttachCtx *actx, struct MuttWindow *win)
View an attachment.
@ MUTT_VA_MAILCAP
Force viewing using mailcap entry.
Definition mutt_attach.h:45
struct MuttWindow * win
Window holding the Menu.
Definition lib.h:88
+ Here is the call graph for this function:

◆ op_attachment_view_pager()

static int op_attachment_view_pager ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

view attachment in pager using copiousoutput mailcap - Implements attach_function_t -

Definition at line 470 of file functions.c.

471{
472 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
473 mutt_view_attachment(cur_att->fp, cur_att->body, MUTT_VA_PAGER,
474 priv->actx->email, priv->actx, priv->menu->win);
476 return FR_SUCCESS;
477}
@ MUTT_VA_PAGER
View attachment in pager using copiousoutput mailcap.
Definition mutt_attach.h:47
+ Here is the call graph for this function:

◆ op_attachment_view_text()

static int op_attachment_view_text ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

view attachment as text - Implements attach_function_t -

Definition at line 482 of file functions.c.

483{
484 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
485 mutt_view_attachment(cur_att->fp, cur_att->body, MUTT_VA_AS_TEXT,
486 priv->actx->email, priv->actx, priv->menu->win);
488 return FR_SUCCESS;
489}
@ MUTT_VA_AS_TEXT
Force viewing as text.
Definition mutt_attach.h:46
+ Here is the call graph for this function:

◆ op_bounce_message()

static int op_bounce_message ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

remail a message to another user - Implements attach_function_t -

Definition at line 494 of file functions.c.

495{
496 if (check_attach(priv))
497 return FR_ERROR;
498 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
499 attach_bounce_message(priv->mailbox, cur_att->fp, priv->actx,
500 priv->menu->tag_prefix ? NULL : cur_att->body);
502 return FR_SUCCESS;
503}
static bool check_attach(struct AttachPrivateData *priv)
Check if in attach-message mode.
Definition functions.c:182
void attach_bounce_message(struct Mailbox *m, FILE *fp, struct AttachCtx *actx, struct Body *b)
Bounce function, from the attachment menu.
Definition recvcmd.c:162
+ Here is the call graph for this function:

◆ op_check_traditional()

static int op_check_traditional ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

check for classic PGP - Implements attach_function_t -

Definition at line 508 of file functions.c.

509{
510 if (((WithCrypto & APPLICATION_PGP) != 0) &&
512 {
513 priv->actx->email->security = crypt_query(NULL);
515 }
516 return FR_SUCCESS;
517}
static int recvattach_pgp_check_traditional(struct AttachCtx *actx, struct Menu *menu)
Is the Attachment inline PGP?
Definition functions.c:243
SecurityFlags crypt_query(struct Body *b)
Check out the type of encryption used.
Definition crypt.c:687
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition lib.h:98
+ Here is the call graph for this function:

◆ op_compose_to_sender()

static int op_compose_to_sender ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

compose new message to the current message sender - Implements attach_function_t -

Definition at line 522 of file functions.c.

523{
524 if (check_attach(priv))
525 return FR_ERROR;
526 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
527 mutt_attach_mail_sender(priv->actx, priv->menu->tag_prefix ? NULL : cur_att->body);
529 return FR_SUCCESS;
530}
void mutt_attach_mail_sender(struct AttachCtx *actx, struct Body *b)
Compose an email to the sender in the email attachment.
Definition recvcmd.c:1123
+ Here is the call graph for this function:

◆ op_exit()

static int op_exit ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

exit this menu - Implements attach_function_t -

Definition at line 535 of file functions.c.

536{
537 priv->actx->email->attach_del = false;
538 for (int i = 0; i < priv->actx->idxlen; i++)
539 {
540 if (priv->actx->idx[i]->body && priv->actx->idx[i]->body->deleted)
541 {
542 priv->actx->email->attach_del = true;
543 break;
544 }
545 }
546 if (priv->actx->email->attach_del)
547 priv->actx->email->changed = true;
548
549 mutt_actx_free(&priv->actx);
550 return FR_DONE;
551}
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition attach.c:198
@ FR_DONE
Exit the Dialog.
Definition dispatcher.h:36
short idxlen
Number of attachmentes.
Definition attach.h:68
bool changed
Email has been edited.
Definition email.h:77
bool attach_del
Has an attachment marked for deletion.
Definition email.h:99
+ Here is the call graph for this function:

◆ op_extract_keys()

static int op_extract_keys ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

extract supported public keys - Implements attach_function_t -

Definition at line 556 of file functions.c.

557{
559 return FR_NO_ACTION;
560
563
564 return FR_SUCCESS;
565}
static void recvattach_extract_pgp_keys(struct AttachCtx *actx, struct Menu *menu)
Extract PGP keys from attachments.
Definition functions.c:216
+ Here is the call graph for this function:

◆ op_forget_passphrase()

static int op_forget_passphrase ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

wipe passphrases from memory - Implements attach_function_t -

Definition at line 570 of file functions.c.

571{
573 return FR_SUCCESS;
574}
void crypt_forget_passphrase(void)
Forget a passphrase and display a message.
Definition crypt.c:89
+ Here is the call graph for this function:

◆ op_forward_message()

static int op_forward_message ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

forward a message with comments - Implements attach_function_t -

Definition at line 579 of file functions.c.

580{
581 if (check_attach(priv))
582 return FR_ERROR;
583 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
584 mutt_attach_forward(cur_att->fp, priv->actx->email, priv->actx,
585 priv->menu->tag_prefix ? NULL : cur_att->body, SEND_NO_FLAGS);
587 return FR_SUCCESS;
588}
void mutt_attach_forward(FILE *fp, struct Email *e, struct AttachCtx *actx, struct Body *b, SendFlags flags)
Forward an Attachment.
Definition recvcmd.c:789
#define SEND_NO_FLAGS
No flags are set.
Definition send.h:41
+ Here is the call graph for this function:

◆ op_list_subscribe()

static int op_list_subscribe ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

subscribe to a mailing list - Implements attach_function_t -

Definition at line 593 of file functions.c.

594{
595 if (!check_attach(priv))
597 return FR_SUCCESS;
598}
bool mutt_send_list_subscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list subscription email.
Definition send.c:2955
+ Here is the call graph for this function:

◆ op_list_unsubscribe()

static int op_list_unsubscribe ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

unsubscribe from a mailing list - Implements attach_function_t -

Definition at line 603 of file functions.c.

604{
605 if (!check_attach(priv))
607 return FR_SUCCESS;
608}
bool mutt_send_list_unsubscribe(struct Mailbox *m, struct Email *e)
Send a mailing-list unsubscription email.
Definition send.c:2984
+ Here is the call graph for this function:

◆ op_reply()

static int op_reply ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

reply to a message - Implements attach_function_t -

Definition at line 613 of file functions.c.

614{
615 if (check_attach(priv))
616 return FR_ERROR;
617
618 const int op = event->op;
619 SendFlags flags = SEND_REPLY;
620 if (op == OP_GROUP_REPLY)
621 flags |= SEND_GROUP_REPLY;
622 else if (op == OP_GROUP_CHAT_REPLY)
623 flags |= SEND_GROUP_CHAT_REPLY;
624 else if (op == OP_LIST_REPLY)
625 flags |= SEND_LIST_REPLY;
626
627 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
628 mutt_attach_reply(cur_att->fp, priv->mailbox, priv->actx->email, priv->actx,
629 priv->menu->tag_prefix ? NULL : cur_att->body, flags);
631 return FR_SUCCESS;
632}
void mutt_attach_reply(FILE *fp, struct Mailbox *m, struct Email *e, struct AttachCtx *actx, struct Body *b, SendFlags flags)
Attach a reply.
Definition recvcmd.c:945
#define SEND_GROUP_CHAT_REPLY
Reply to all recipients preserving To/Cc.
Definition send.h:54
uint32_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
Definition send.h:40
#define SEND_GROUP_REPLY
Reply to all.
Definition send.h:43
#define SEND_LIST_REPLY
Reply to mailing list.
Definition send.h:44
#define SEND_REPLY
Reply to sender.
Definition send.h:42
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ op_resend()

static int op_resend ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

use the current message as a template for a new one - Implements attach_function_t -

Definition at line 637 of file functions.c.

638{
639 if (check_attach(priv))
640 return FR_ERROR;
641 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
642 mutt_attach_resend(cur_att->fp, priv->mailbox, priv->actx,
643 priv->menu->tag_prefix ? NULL : cur_att->body);
645 return FR_SUCCESS;
646}
void mutt_attach_resend(FILE *fp, struct Mailbox *m, struct AttachCtx *actx, struct Body *b)
Resend-message, from the attachment menu.
Definition recvcmd.c:286
+ Here is the call graph for this function:

◆ op_followup()

static int op_followup ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

followup to newsgroup - Implements attach_function_t -

Definition at line 653 of file functions.c.

654{
655 if (check_attach(priv))
656 return FR_ERROR;
657
658 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
659 if (!cur_att->body->email || !cur_att->body->email->env)
660 {
661 mutt_error(_("You may only followup to message/rfc822 parts"));
662 return FR_ERROR;
663 }
664 if (!cur_att->body->email->env->followup_to ||
665 !mutt_istr_equal(cur_att->body->email->env->followup_to, "poster") ||
666 (query_quadoption(_("Reply by mail as poster prefers?"), NeoMutt->sub,
667 "followup_to_poster") != MUTT_YES))
668 {
669 mutt_attach_reply(cur_att->fp, priv->mailbox, priv->actx->email, priv->actx,
670 priv->menu->tag_prefix ? NULL : cur_att->body, SEND_NEWS | SEND_REPLY);
672 return FR_SUCCESS;
673 }
674
675 return op_reply(priv, event);
676}
static int op_reply(struct AttachPrivateData *priv, const struct KeyEvent *event)
reply to a message - Implements attach_function_t -
Definition functions.c:613
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
Definition string.c:674
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition quad.h:39
enum QuadOption query_quadoption(const char *prompt, struct ConfigSubset *sub, const char *name)
Ask the user a quad-question.
Definition question.c:378
#define SEND_NEWS
Reply to a news article.
Definition send.h:55
struct Email * email
header information for message/rfc822
Definition body.h:74
struct Envelope * env
Envelope information.
Definition email.h:68
char * followup_to
List of 'followup-to' fields.
Definition envelope.h:80
+ Here is the call graph for this function:

◆ op_forward_to_group()

static int op_forward_to_group ( struct AttachPrivateData * priv,
const struct KeyEvent * event )
static

forward to newsgroup - Implements attach_function_t -

Definition at line 681 of file functions.c.

682{
683 if (check_attach(priv))
684 return FR_ERROR;
685 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
686 mutt_attach_forward(cur_att->fp, priv->actx->email, priv->actx,
687 priv->menu->tag_prefix ? NULL : cur_att->body, SEND_NEWS);
689 return FR_SUCCESS;
690}
+ Here is the call graph for this function: