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

Detailed Description

Prototype for an Attachment Function.

Parameters
privPrivate Attach data
opOperation to perform, e.g. OP_ATTACHMENT_COLLAPSE
Return values
enumFunctionRetval

Function Documentation

◆ op_attachment_collapse()

static int op_attachment_collapse ( struct AttachPrivateData priv,
int  op 
)
static

toggle display of subparts - Implements attach_function_t -

Definition at line 252 of file functions.c.

253{
254 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
255 if (!cur_att->body->parts)
256 {
257 mutt_error(_("There are no subparts to show"));
258 return FR_NO_ACTION;
259 }
260 attach_collapse(priv->actx, priv->menu);
261 mutt_update_recvattach_menu(priv->actx, priv->menu, false);
262 return FR_SUCCESS;
263}
static void attach_collapse(struct AttachCtx *actx, struct Menu *menu)
Close the tree of the current attachment.
Definition: functions.c:132
@ FR_SUCCESS
Valid function - successfully performed.
Definition: dispatcher.h:39
@ FR_NO_ACTION
Valid function - no action performed.
Definition: dispatcher.h:37
#define mutt_error(...)
Definition: logging2.h:92
#define _(a)
Definition: message.h:28
void mutt_update_recvattach_menu(struct AttachCtx *actx, struct Menu *menu, bool init)
Update the Attachment Menu.
Definition: recvattach.c:1208
struct AttachPtr * current_attachment(struct AttachCtx *actx, struct Menu *menu)
Get the current attachment.
Definition: recvattach.c:71
struct Menu * menu
Current Menu.
Definition: private_data.h:36
struct AttachCtx * actx
List of all Attachments.
Definition: private_data.h:37
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:72
+ Here is the call graph for this function:

◆ op_attachment_delete()

static int op_attachment_delete ( struct AttachPrivateData priv,
int  op 
)
static

delete the current entry - Implements attach_function_t -

Definition at line 268 of file functions.c.

269{
270 if (check_readonly(priv->mailbox))
271 return FR_ERROR;
272
273 if (priv->mailbox->type == MUTT_POP)
274 {
276 mutt_error(_("Can't delete attachment from POP server"));
277 return FR_ERROR;
278 }
279
280 if (priv->mailbox->type == MUTT_NNTP)
281 {
283 mutt_error(_("Can't delete attachment from news server"));
284 return FR_ERROR;
285 }
286
287 if ((WithCrypto != 0) && (priv->actx->email->security & SEC_ENCRYPT))
288 {
289 mutt_message(_("Deletion of attachments from encrypted messages is unsupported"));
290 return FR_ERROR;
291 }
292 if ((WithCrypto != 0) && (priv->actx->email->security & (SEC_SIGN | SEC_PARTSIGN)))
293 {
294 mutt_message(_("Deletion of attachments from signed messages may invalidate the signature"));
295 }
296
297 if (priv->menu->tag_prefix)
298 {
299 for (int i = 0; i < priv->menu->max; i++)
300 {
301 if (priv->actx->idx[i]->body->tagged)
302 {
303 if (priv->actx->idx[i]->parent_type == TYPE_MULTIPART)
304 {
305 priv->actx->idx[i]->body->deleted = true;
307 }
308 else
309 {
310 mutt_message(_("Only deletion of multipart attachments is supported"));
311 }
312 }
313 }
314 }
315 else
316 {
317 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
318 if (cur_att->parent_type == TYPE_MULTIPART)
319 {
320 cur_att->body->deleted = true;
321 const bool c_resolve = cs_subset_bool(NeoMutt->sub, "resolve");
322 const int index = menu_get_index(priv->menu) + 1;
323 if (c_resolve && (index < priv->menu->max))
324 {
325 menu_set_index(priv->menu, index);
326 }
327 else
328 {
330 }
331 }
332 else
333 {
334 mutt_message(_("Only deletion of multipart attachments is supported"));
335 }
336 }
337
338 return FR_SUCCESS;
339}
static bool check_readonly(struct Mailbox *m)
Check if the Mailbox is readonly.
Definition: functions.c:184
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:48
void mutt_flushinp(void)
Empty all the keyboard buffers.
Definition: get.c:57
@ FR_ERROR
Valid function - error occurred.
Definition: dispatcher.h:38
#define mutt_message(...)
Definition: logging2.h:91
@ MUTT_POP
'POP3' Mailbox type
Definition: mailbox.h:52
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
Definition: mailbox.h:49
#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:180
int menu_get_index(struct Menu *menu)
Get the current selection in the Menu.
Definition: menu.c:156
#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:170
@ TYPE_MULTIPART
Type: 'multipart/*'.
Definition: mime.h:37
#define SEC_PARTSIGN
Not all parts of the email is signed.
Definition: lib.h:83
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:79
#define WithCrypto
Definition: lib.h:117
#define SEC_SIGN
Email is signed.
Definition: lib.h:80
struct Email * email
Used by recvattach for updating.
Definition: attach.h:52
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:55
struct Mailbox * mailbox
Current Mailbox.
Definition: private_data.h:39
int parent_type
Type of parent attachment, e.g. TYPE_MULTIPART.
Definition: attach.h:38
bool deleted
Attachment marked for deletion.
Definition: body.h:87
bool tagged
This attachment is tagged.
Definition: body.h:89
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition: email.h:41
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
bool tag_prefix
User has pressed <tag-prefix>
Definition: lib.h:76
int max
Number of entries in the menu.
Definition: lib.h:72
Container for Accounts, Notifications.
Definition: neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:45
+ Here is the call graph for this function:

◆ op_attachment_edit_type()

static int op_attachment_edit_type ( struct AttachPrivateData priv,
int  op 
)
static

edit attachment content type - Implements attach_function_t -

Definition at line 344 of file functions.c.

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

◆ op_attachment_pipe()

static int op_attachment_pipe ( struct AttachPrivateData priv,
int  op 
)
static

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

Definition at line 354 of file functions.c.

355{
356 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
357 mutt_pipe_attachment_list(priv->actx, cur_att->fp, priv->menu->tag_prefix,
358 cur_att->body, false);
359 return FR_SUCCESS;
360}
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:719
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,
int  op 
)
static

print the current entry - Implements attach_function_t -

Definition at line 365 of file functions.c.

366{
367 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
368 mutt_print_attachment_list(priv->actx, cur_att->fp, priv->menu->tag_prefix,
369 cur_att->body);
370 return FR_SUCCESS;
371}
void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *b)
Print a list of Attachments.
Definition: recvattach.c:882
+ Here is the call graph for this function:

◆ op_attachment_save()

static int op_attachment_save ( struct AttachPrivateData priv,
int  op 
)
static

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

Definition at line 376 of file functions.c.

377{
378 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
379 mutt_save_attachment_list(priv->actx, cur_att->fp, priv->menu->tag_prefix,
380 cur_att->body, priv->actx->email, priv->menu);
381
382 const bool c_resolve = cs_subset_bool(NeoMutt->sub, "resolve");
383 const int index = menu_get_index(priv->menu) + 1;
384 if (!priv->menu->tag_prefix && c_resolve && (index < priv->menu->max))
385 menu_set_index(priv->menu, index);
386 return FR_SUCCESS;
387}
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:427
+ Here is the call graph for this function:

◆ op_attachment_undelete()

static int op_attachment_undelete ( struct AttachPrivateData priv,
int  op 
)
static

undelete the current entry - Implements attach_function_t -

Definition at line 392 of file functions.c.

393{
394 if (check_readonly(priv->mailbox))
395 return FR_ERROR;
396
397 if (priv->menu->tag_prefix)
398 {
399 for (int i = 0; i < priv->menu->max; i++)
400 {
401 if (priv->actx->idx[i]->body->tagged)
402 {
403 priv->actx->idx[i]->body->deleted = false;
405 }
406 }
407 }
408 else
409 {
410 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
411 cur_att->body->deleted = false;
412 const bool c_resolve = cs_subset_bool(NeoMutt->sub, "resolve");
413 const int index = menu_get_index(priv->menu) + 1;
414 if (c_resolve && (index < priv->menu->max))
415 {
416 menu_set_index(priv->menu, index);
417 }
418 else
419 {
421 }
422 }
423
424 return FR_SUCCESS;
425}
+ Here is the call graph for this function:

◆ op_attachment_view()

static int op_attachment_view ( struct AttachPrivateData priv,
int  op 
)
static

view attachment using mailcap entry if necessary - Implements attach_function_t -

Definition at line 430 of file functions.c.

431{
432 priv->op = mutt_attach_display_loop(priv->sub, priv->menu, op,
433 priv->actx->email, priv->actx, true);
435
436 return FR_CONTINUE;
437}
@ FR_CONTINUE
Remain in the Dialog.
Definition: dispatcher.h:34
#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:956
int op
Op returned from the Pager, e.g. OP_NEXT_ENTRY.
Definition: private_data.h:40
struct ConfigSubset * sub
Config subset.
Definition: private_data.h:38
+ Here is the call graph for this function:

◆ op_attachment_view_mailcap()

static int op_attachment_view_mailcap ( struct AttachPrivateData priv,
int  op 
)
static

force viewing of attachment using mailcap - Implements attach_function_t -

Definition at line 442 of file functions.c.

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

◆ op_attachment_view_pager()

static int op_attachment_view_pager ( struct AttachPrivateData priv,
int  op 
)
static

view attachment in pager using copiousoutput mailcap - Implements attach_function_t -

Definition at line 454 of file functions.c.

455{
456 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
457 mutt_view_attachment(cur_att->fp, cur_att->body, MUTT_VA_PAGER,
458 priv->actx->email, priv->actx, priv->menu->win);
460 return FR_SUCCESS;
461}
@ 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,
int  op 
)
static

view attachment as text - Implements attach_function_t -

Definition at line 466 of file functions.c.

467{
468 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
469 mutt_view_attachment(cur_att->fp, cur_att->body, MUTT_VA_AS_TEXT,
470 priv->actx->email, priv->actx, priv->menu->win);
472 return FR_SUCCESS;
473}
@ 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,
int  op 
)
static

remail a message to another user - Implements attach_function_t -

Definition at line 478 of file functions.c.

479{
480 if (check_attach(priv))
481 return FR_ERROR;
482 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
483 attach_bounce_message(priv->mailbox, cur_att->fp, priv->actx,
484 priv->menu->tag_prefix ? NULL : cur_att->body);
486 return FR_SUCCESS;
487}
static bool check_attach(struct AttachPrivateData *priv)
Check if in attach-message mode.
Definition: functions.c:167
void attach_bounce_message(struct Mailbox *m, FILE *fp, struct AttachCtx *actx, struct Body *b)
Bounce function, from the attachment menu.
Definition: recvcmd.c:163
+ Here is the call graph for this function:

◆ op_check_traditional()

static int op_check_traditional ( struct AttachPrivateData priv,
int  op 
)
static

check for classic PGP - Implements attach_function_t -

Definition at line 492 of file functions.c.

493{
494 if (((WithCrypto & APPLICATION_PGP) != 0) &&
496 {
497 priv->actx->email->security = crypt_query(NULL);
499 }
500 return FR_SUCCESS;
501}
static int recvattach_pgp_check_traditional(struct AttachCtx *actx, struct Menu *menu)
Is the Attachment inline PGP?
Definition: functions.c:228
SecurityFlags crypt_query(struct Body *b)
Check out the type of encryption used.
Definition: crypt.c:676
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:91
+ Here is the call graph for this function:

◆ op_compose_to_sender()

static int op_compose_to_sender ( struct AttachPrivateData priv,
int  op 
)
static

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

Definition at line 506 of file functions.c.

507{
508 if (check_attach(priv))
509 return FR_ERROR;
510 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
511 mutt_attach_mail_sender(priv->actx, priv->menu->tag_prefix ? NULL : cur_att->body);
513 return FR_SUCCESS;
514}
void mutt_attach_mail_sender(struct AttachCtx *actx, struct Body *b)
Compose an email to the sender in the email attachment.
Definition: recvcmd.c:1120
+ Here is the call graph for this function:

◆ op_exit()

static int op_exit ( struct AttachPrivateData priv,
int  op 
)
static

exit this menu - Implements attach_function_t -

Definition at line 519 of file functions.c.

520{
521 priv->actx->email->attach_del = false;
522 for (int i = 0; i < priv->actx->idxlen; i++)
523 {
524 if (priv->actx->idx[i]->body && priv->actx->idx[i]->body->deleted)
525 {
526 priv->actx->email->attach_del = true;
527 break;
528 }
529 }
530 if (priv->actx->email->attach_del)
531 priv->actx->email->changed = true;
532
533 mutt_actx_free(&priv->actx);
534 return FR_DONE;
535}
void mutt_actx_free(struct AttachCtx **ptr)
Free an Attachment Context.
Definition: attach.c:198
@ FR_DONE
Exit the Dialog.
Definition: dispatcher.h:35
short idxlen
Number of attachmentes.
Definition: attach.h:56
bool changed
Email has been edited.
Definition: email.h:75
bool attach_del
Has an attachment marked for deletion.
Definition: email.h:100
+ Here is the call graph for this function:

◆ op_extract_keys()

static int op_extract_keys ( struct AttachPrivateData priv,
int  op 
)
static

extract supported public keys - Implements attach_function_t -

Definition at line 540 of file functions.c.

541{
543 return FR_NO_ACTION;
544
547
548 return FR_SUCCESS;
549}
static void recvattach_extract_pgp_keys(struct AttachCtx *actx, struct Menu *menu)
Extract PGP keys from attachments.
Definition: functions.c:201
+ Here is the call graph for this function:

◆ op_forget_passphrase()

static int op_forget_passphrase ( struct AttachPrivateData priv,
int  op 
)
static

wipe passphrases from memory - Implements attach_function_t -

Definition at line 554 of file functions.c.

555{
557 return FR_SUCCESS;
558}
void crypt_forget_passphrase(void)
Forget a passphrase and display a message.
Definition: crypt.c:93
+ Here is the call graph for this function:

◆ op_forward_message()

static int op_forward_message ( struct AttachPrivateData priv,
int  op 
)
static

forward a message with comments - Implements attach_function_t -

Definition at line 563 of file functions.c.

564{
565 if (check_attach(priv))
566 return FR_ERROR;
567 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
568 mutt_attach_forward(cur_att->fp, priv->actx->email, priv->actx,
569 priv->menu->tag_prefix ? NULL : cur_att->body, SEND_NO_FLAGS);
571 return FR_SUCCESS;
572}
void mutt_attach_forward(FILE *fp, struct Email *e, struct AttachCtx *actx, struct Body *b, SendFlags flags)
Forward an Attachment.
Definition: recvcmd.c:787
#define SEND_NO_FLAGS
No flags are set.
Definition: send.h:39
+ Here is the call graph for this function:

◆ op_list_subscribe()

static int op_list_subscribe ( struct AttachPrivateData priv,
int  op 
)
static

subscribe to a mailing list - Implements attach_function_t -

Definition at line 577 of file functions.c.

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

◆ op_list_unsubscribe()

static int op_list_unsubscribe ( struct AttachPrivateData priv,
int  op 
)
static

unsubscribe from a mailing list - Implements attach_function_t -

Definition at line 587 of file functions.c.

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

◆ op_reply()

static int op_reply ( struct AttachPrivateData priv,
int  op 
)
static

reply to a message - Implements attach_function_t -

Definition at line 597 of file functions.c.

598{
599 if (check_attach(priv))
600 return FR_ERROR;
601
602 SendFlags flags = SEND_REPLY;
603 if (op == OP_GROUP_REPLY)
604 flags |= SEND_GROUP_REPLY;
605 else if (op == OP_GROUP_CHAT_REPLY)
606 flags |= SEND_GROUP_CHAT_REPLY;
607 else if (op == OP_LIST_REPLY)
608 flags |= SEND_LIST_REPLY;
609
610 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
611 mutt_attach_reply(cur_att->fp, priv->mailbox, priv->actx->email, priv->actx,
612 priv->menu->tag_prefix ? NULL : cur_att->body, flags);
614 return FR_SUCCESS;
615}
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:943
#define SEND_GROUP_CHAT_REPLY
Reply to all recipients preserving To/Cc.
Definition: send.h:52
#define SEND_GROUP_REPLY
Reply to all.
Definition: send.h:41
#define SEND_LIST_REPLY
Reply to mailing list.
Definition: send.h:42
#define SEND_REPLY
Reply to sender.
Definition: send.h:40
uint16_t SendFlags
Flags for mutt_send_message(), e.g. SEND_REPLY.
Definition: send.h:38
+ 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,
int  op 
)
static

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

Definition at line 620 of file functions.c.

621{
622 if (check_attach(priv))
623 return FR_ERROR;
624 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
625 mutt_attach_resend(cur_att->fp, priv->mailbox, priv->actx,
626 priv->menu->tag_prefix ? NULL : cur_att->body);
628 return FR_SUCCESS;
629}
void mutt_attach_resend(FILE *fp, struct Mailbox *m, struct AttachCtx *actx, struct Body *b)
Resend-message, from the attachment menu.
Definition: recvcmd.c:287
+ Here is the call graph for this function:

◆ op_followup()

static int op_followup ( struct AttachPrivateData priv,
int  op 
)
static

followup to newsgroup - Implements attach_function_t -

Definition at line 636 of file functions.c.

637{
638 if (check_attach(priv))
639 return FR_ERROR;
640
641 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
642 if (!cur_att->body->email->env->followup_to ||
643 !mutt_istr_equal(cur_att->body->email->env->followup_to, "poster") ||
644 (query_quadoption(_("Reply by mail as poster prefers?"), NeoMutt->sub,
645 "followup_to_poster") != MUTT_YES))
646 {
647 mutt_attach_reply(cur_att->fp, priv->mailbox, priv->actx->email, priv->actx,
648 priv->menu->tag_prefix ? NULL : cur_att->body, SEND_NEWS | SEND_REPLY);
650 return FR_SUCCESS;
651 }
652
653 return op_reply(priv, op);
654}
static int op_reply(struct AttachPrivateData *priv, int op)
reply to a message - Implements attach_function_t -
Definition: functions.c:597
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
Definition: string.c:775
@ 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:369
#define SEND_NEWS
Reply to a news article.
Definition: send.h:53
struct Email * email
header information for message/rfc822
Definition: body.h:73
struct Envelope * env
Envelope information.
Definition: email.h:66
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,
int  op 
)
static

forward to newsgroup - Implements attach_function_t -

Definition at line 659 of file functions.c.

660{
661 if (check_attach(priv))
662 return FR_ERROR;
663 struct AttachPtr *cur_att = current_attachment(priv->actx, priv->menu);
664 mutt_attach_forward(cur_att->fp, priv->actx->email, priv->actx,
665 priv->menu->tag_prefix ? NULL : cur_att->body, SEND_NEWS);
667 return FR_SUCCESS;
668}
+ Here is the call graph for this function: