NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
recvcmd.h File Reference
#include <stdio.h>
#include "send/lib.h"
+ Include dependency graph for recvcmd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void mutt_attach_bounce (struct Mailbox *m, FILE *fp, struct AttachCtx *actx, struct Body *cur)
 Bounce function, from the attachment menu. More...
 
void mutt_attach_resend (FILE *fp, struct Context *ctx, struct AttachCtx *actx, struct Body *cur)
 resend-message, from the attachment menu More...
 
void mutt_attach_forward (FILE *fp, struct Mailbox *m, struct Email *e, struct AttachCtx *actx, struct Body *cur, SendFlags flags)
 Forward an Attachment. More...
 
void mutt_attach_reply (FILE *fp, struct Mailbox *m, struct Email *e, struct AttachCtx *actx, struct Body *e_cur, SendFlags flags)
 Attach a reply. More...
 
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. More...
 

Variables

unsigned char C_MimeForwardRest
 Config: Forward all attachments, even if they can't be decoded. More...
 

Detailed Description

Send/reply with an attachment

Authors
  • Thomas Roessler

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file recvcmd.h.

Function Documentation

◆ mutt_attach_bounce()

void mutt_attach_bounce ( struct Mailbox m,
FILE *  fp,
struct AttachCtx actx,
struct Body cur 
)

Bounce function, from the attachment menu.

Parameters
mMailbox
fpHandle of message
actxAttachment context
curBody of email

Definition at line 168 of file recvcmd.c.

169 {
170  if (!m || !fp || !actx)
171  return;
172 
173  char prompt[256];
174  char buf[8192];
175  char *err = NULL;
176  int ret = 0;
177  int p = 0;
178 
179  if (!check_all_msg(actx, cur, true))
180  return;
181 
182  /* one or more messages? */
183  p = cur ? 1 : count_tagged(actx);
184 
185  /* RFC5322 mandates a From: header, so warn before bouncing
186  * messages without one */
187  if (cur)
188  {
189  if (TAILQ_EMPTY(&cur->email->env->from))
190  {
191  mutt_error(_("Warning: message contains no From: header"));
193  }
194  }
195  else
196  {
197  for (short i = 0; i < actx->idxlen; i++)
198  {
199  if (actx->idx[i]->body->tagged)
200  {
201  if (TAILQ_EMPTY(&actx->idx[i]->body->email->env->from))
202  {
203  mutt_error(_("Warning: message contains no From: header"));
205  break;
206  }
207  }
208  }
209  }
210 
211  if (p)
212  mutt_str_copy(prompt, _("Bounce message to: "), sizeof(prompt));
213  else
214  mutt_str_copy(prompt, _("Bounce tagged messages to: "), sizeof(prompt));
215 
216  buf[0] = '\0';
217  if (mutt_get_field(prompt, buf, sizeof(buf), MUTT_ALIAS, false, NULL, NULL) ||
218  (buf[0] == '\0'))
219  {
220  return;
221  }
222 
223  struct AddressList al = TAILQ_HEAD_INITIALIZER(al);
224  mutt_addrlist_parse(&al, buf);
225  if (TAILQ_EMPTY(&al))
226  {
227  mutt_error(_("Error parsing address"));
228  return;
229  }
230 
231  mutt_expand_aliases(&al);
232 
233  if (mutt_addrlist_to_intl(&al, &err) < 0)
234  {
235  mutt_error(_("Bad IDN: '%s'"), err);
236  FREE(&err);
237  goto end;
238  }
239 
240  buf[0] = '\0';
241  mutt_addrlist_write(&al, buf, sizeof(buf), true);
242 
243 #define EXTRA_SPACE (15 + 7 + 2)
244  /* See commands.c. */
245  snprintf(prompt, sizeof(prompt) - 4,
246  ngettext("Bounce message to %s?", "Bounce messages to %s?", p), buf);
247 
249  {
250  mutt_simple_format(prompt, sizeof(prompt) - 4, 0, MessageWindow->state.cols - EXTRA_SPACE,
251  JUSTIFY_LEFT, 0, prompt, sizeof(prompt), false);
252  mutt_str_cat(prompt, sizeof(prompt), "...?");
253  }
254  else
255  mutt_str_cat(prompt, sizeof(prompt), "?");
256 
257  if (query_quadoption(C_Bounce, prompt) != MUTT_YES)
258  {
260  mutt_message(ngettext("Message not bounced", "Messages not bounced", p));
261  goto end;
262  }
263 
265 
266  if (cur)
267  ret = mutt_bounce_message(fp, m, cur->email, &al, NeoMutt->sub);
268  else
269  {
270  for (short i = 0; i < actx->idxlen; i++)
271  {
272  if (actx->idx[i]->body->tagged)
273  {
274  if (mutt_bounce_message(actx->idx[i]->fp, m, actx->idx[i]->body->email,
275  &al, NeoMutt->sub))
276  {
277  ret = 1;
278  }
279  }
280  }
281  }
282 
283  if (ret == 0)
284  mutt_message(ngettext("Message bounced", "Messages bounced", p));
285  else
286  mutt_error(ngettext("Error bouncing message", "Error bouncing messages", p));
287 
288 end:
289  mutt_addrlist_clear(&al);
290 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_attach_resend()

void mutt_attach_resend ( FILE *  fp,
struct Context ctx,
struct AttachCtx actx,
struct Body cur 
)

resend-message, from the attachment menu

Parameters
fpFile containing email
ctxCurrent mailbox
actxAttachment context
curAttachment

Definition at line 299 of file recvcmd.c.

301 {
302  if (!check_all_msg(actx, cur, true))
303  return;
304 
305  if (cur)
306  mutt_resend_message(fp, ctx, cur->email, NeoMutt->sub);
307  else
308  {
309  for (short i = 0; i < actx->idxlen; i++)
310  {
311  if (actx->idx[i]->body->tagged)
312  {
313  mutt_resend_message(actx->idx[i]->fp, ctx, actx->idx[i]->body->email,
314  NeoMutt->sub);
315  }
316  }
317  }
318 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_attach_forward()

void mutt_attach_forward ( FILE *  fp,
struct Mailbox m,
struct Email e,
struct AttachCtx actx,
struct Body cur,
SendFlags  flags 
)

Forward an Attachment.

Parameters
fpHandle to the attachment
mMailbox
eEmail
actxAttachment Context
curCurrent message
flagsSend mode, see SendFlags

Definition at line 776 of file recvcmd.c.

778 {
779  if (check_all_msg(actx, cur, false))
780  attach_forward_msgs(fp, m, actx, cur, flags);
781  else
782  {
783  const short nattach = count_tagged(actx);
784  attach_forward_bodies(fp, m, e, actx, cur, nattach);
785  }
786 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_attach_reply()

void mutt_attach_reply ( FILE *  fp,
struct Mailbox m,
struct Email e,
struct AttachCtx actx,
struct Body e_cur,
SendFlags  flags 
)

Attach a reply.

Parameters
fpFile handle to reply
mMailbox
eEmail
actxAttachment Context
e_curCurrent message
flagsSend mode, see SendFlags

Definition at line 929 of file recvcmd.c.

931 {
932  bool mime_reply_any = false;
933 
934  short nattach = 0;
935  struct AttachPtr *parent = NULL;
936  struct Email *e_parent = NULL;
937  FILE *fp_parent = NULL;
938  struct Email *e_tmp = NULL;
939  FILE *fp_tmp = NULL;
940  struct Buffer *tmpbody = NULL;
941  struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
942 
943  char prefix[128];
944 
945 #ifdef USE_NNTP
946  if (flags & SEND_NEWS)
947  OptNewsSend = true;
948  else
949  OptNewsSend = false;
950 #endif
951 
952  if (!check_all_msg(actx, e_cur, false))
953  {
954  nattach = count_tagged(actx);
955  parent = find_parent(actx, e_cur, nattach);
956  if (parent)
957  {
958  e_parent = parent->body->email;
959  fp_parent = parent->fp;
960  }
961  else
962  {
963  e_parent = e;
964  fp_parent = actx->fp_root;
965  }
966  }
967 
968  if ((nattach > 1) && !check_can_decode(actx, e_cur))
969  {
970  const enum QuadOption ans = query_quadoption(
971  C_MimeForwardRest, _("Can't decode all tagged attachments. "
972  "MIME-encapsulate the others?"));
973  if (ans == MUTT_ABORT)
974  return;
975  if (ans == MUTT_YES)
976  mime_reply_any = true;
977  }
978  else if (nattach == 1)
979  mime_reply_any = true;
980 
981  e_tmp = email_new();
982  e_tmp->env = mutt_env_new();
983 
985  e_tmp->env, actx, e_parent ? e_parent : (e_cur ? e_cur->email : NULL), flags) == -1)
986  {
987  goto cleanup;
988  }
989 
990  tmpbody = mutt_buffer_pool_get();
991  mutt_buffer_mktemp(tmpbody);
992  fp_tmp = mutt_file_fopen(mutt_buffer_string(tmpbody), "w");
993  if (!fp_tmp)
994  {
995  mutt_error(_("Can't create %s"), mutt_buffer_string(tmpbody));
996  goto cleanup;
997  }
998 
999  if (!e_parent)
1000  {
1001  if (e_cur)
1002  attach_include_reply(fp, fp_tmp, m, e_cur->email);
1003  else
1004  {
1005  for (short i = 0; i < actx->idxlen; i++)
1006  {
1007  if (actx->idx[i]->body->tagged)
1008  attach_include_reply(actx->idx[i]->fp, fp_tmp, m, actx->idx[i]->body->email);
1009  }
1010  }
1011  }
1012  else
1013  {
1014  mutt_make_attribution(m, e_parent, fp_tmp, NeoMutt->sub);
1015 
1016  struct State st;
1017  memset(&st, 0, sizeof(struct State));
1018  st.fp_out = fp_tmp;
1019 
1020  if (C_TextFlowed)
1021  {
1022  mutt_str_copy(prefix, ">", sizeof(prefix));
1023  }
1024  else
1025  {
1026  mutt_make_string(prefix, sizeof(prefix), 0, NONULL(C_IndentString), m, -1,
1027  e_parent, MUTT_FORMAT_NO_FLAGS, NULL);
1028  }
1029 
1030  st.prefix = prefix;
1031  st.flags = MUTT_CHARCONV;
1032 
1033  if (C_Weed)
1034  st.flags |= MUTT_WEED;
1035 
1036  if (C_Header)
1037  include_header(true, fp_parent, m, e_parent, fp_tmp, prefix);
1038 
1039  if (e_cur)
1040  {
1041  if (mutt_can_decode(e_cur))
1042  {
1043  st.fp_in = fp;
1044  mutt_body_handler(e_cur, &st);
1045  state_putc(&st, '\n');
1046  }
1047  else
1048  mutt_body_copy(fp, &e_tmp->body, e_cur);
1049  }
1050  else
1051  {
1052  for (short i = 0; i < actx->idxlen; i++)
1053  {
1054  if (actx->idx[i]->body->tagged && mutt_can_decode(actx->idx[i]->body))
1055  {
1056  st.fp_in = actx->idx[i]->fp;
1057  mutt_body_handler(actx->idx[i]->body, &st);
1058  state_putc(&st, '\n');
1059  }
1060  }
1061  }
1062 
1063  mutt_make_post_indent(m, e_parent, fp_tmp, NeoMutt->sub);
1064 
1065  if (mime_reply_any && !e_cur && !copy_problematic_attachments(&e_tmp->body, actx, false))
1066  {
1067  goto cleanup;
1068  }
1069  }
1070 
1071  mutt_file_fclose(&fp_tmp);
1072 
1073  emaillist_add_email(&el, e_parent ? e_parent : (e_cur ? e_cur->email : NULL));
1074  if (mutt_send_message(flags, e_tmp, mutt_buffer_string(tmpbody), NULL, &el,
1075  NeoMutt->sub) == 0)
1076  {
1077  mutt_set_flag(m, e, MUTT_REPLIED, true);
1078  }
1079  e_tmp = NULL; /* mutt_send_message frees this */
1080 
1081 cleanup:
1082  if (fp_tmp)
1083  {
1084  mutt_file_fclose(&fp_tmp);
1086  }
1087  mutt_buffer_pool_release(&tmpbody);
1088  email_free(&e_tmp);
1089  emaillist_clear(&el);
1090 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_attach_mail_sender()

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.

Parameters
fpFile containing attachment (UNUSED)
eEmail (UNUSED)
actxAttachment Context
curCurrent attachment

Definition at line 1099 of file recvcmd.c.

1101 {
1102  if (!check_all_msg(actx, cur, 0))
1103  {
1104  /* L10N: You will see this error message if you invoke <compose-to-sender>
1105  when you are on a normal attachment. */
1106  mutt_error(_("You may only compose to sender with message/rfc822 parts"));
1107  return;
1108  }
1109 
1110  struct Email *e_tmp = email_new();
1111  e_tmp->env = mutt_env_new();
1112 
1113  if (cur)
1114  {
1115  if (mutt_fetch_recips(e_tmp->env, cur->email->env, SEND_TO_SENDER, NeoMutt->sub) == -1)
1116  {
1117  email_free(&e_tmp);
1118  return;
1119  }
1120  }
1121  else
1122  {
1123  for (int i = 0; i < actx->idxlen; i++)
1124  {
1125  if (actx->idx[i]->body->tagged &&
1126  (mutt_fetch_recips(e_tmp->env, actx->idx[i]->body->email->env,
1127  SEND_TO_SENDER, NeoMutt->sub) == -1))
1128  {
1129  email_free(&e_tmp);
1130  return;
1131  }
1132  }
1133  }
1134 
1135  // This call will free e_tmp for us
1136  mutt_send_message(SEND_NO_FLAGS, e_tmp, NULL, NULL, NULL, NeoMutt->sub);
1137 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ C_MimeForwardRest

unsigned char C_MimeForwardRest

Config: Forward all attachments, even if they can't be decoded.

Definition at line 60 of file recvcmd.c.

C_Header
WHERE bool C_Header
Config: Include the message headers in the reply email (Weed applies)
Definition: mutt_globals.h:149
QuadOption
QuadOption
Possible values for a quad-option.
Definition: quad.h:36
AttachCtx::fp_root
FILE * fp_root
Used by recvattach for updating.
Definition: attach.h:52
MessageWindow
struct MuttWindow * MessageWindow
Message Window, ":set", etc.
Definition: mutt_window.c:47
_
#define _(a)
Definition: message.h:28
NONULL
#define NONULL(x)
Definition: string2.h:37
include_header
static void include_header(bool quote, FILE *fp_in, struct Mailbox *m, struct Email *e, FILE *fp_out, char *prefix)
Write an email header to a file, optionally quoting it.
Definition: recvcmd.c:414
mutt_make_string
void mutt_make_string(char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
Definition: hdrline.c:1427
C_TextFlowed
WHERE bool C_TextFlowed
Config: Generate 'format=flowed' messages.
Definition: mutt_globals.h:166
Buffer
String manipulation buffer.
Definition: buffer.h:33
mutt_addrlist_to_intl
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
Definition: address.c:1304
mutt_file_fclose
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
AttachPtr::fp
FILE * fp
Used in the recvattach menu.
Definition: attach.h:37
mutt_window_clearline
void mutt_window_clearline(struct MuttWindow *win, int row)
Clear a row of a Window.
Definition: mutt_window.c:232
mutt_addrlist_write
size_t mutt_addrlist_write(const struct AddressList *al, char *buf, size_t buflen, bool display)
Write an Address to a buffer.
Definition: address.c:1150
mutt_buffer_mktemp
#define mutt_buffer_mktemp(buf)
Definition: muttlib.h:77
AttachPtr
An email to which things will be attached.
Definition: attach.h:34
TAILQ_EMPTY
#define TAILQ_EMPTY(head)
Definition: queue.h:714
MUTT_YES
@ MUTT_YES
User answered 'Yes', or assume 'Yes'.
Definition: quad.h:40
mutt_expand_aliases
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:294
mutt_file_fopen
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
Definition: file.c:589
mutt_file_unlink
void mutt_file_unlink(const char *s)
Delete a file, carefully.
Definition: file.c:195
mutt_strwidth
int mutt_strwidth(const char *s)
Measure a string's width in screen cells.
Definition: curs_lib.c:1363
copy_problematic_attachments
static struct Body ** copy_problematic_attachments(struct Body **last, struct AttachCtx *actx, bool force)
Attach the body parts which can't be decoded.
Definition: recvcmd.c:450
FREE
#define FREE(x)
Definition: memory.h:40
mutt_make_attribution
void mutt_make_attribution(struct Mailbox *m, struct Email *e, FILE *fp_out, struct ConfigSubset *sub)
Add "on DATE, PERSON wrote" header.
Definition: send.c:593
state_putc
#define state_putc(STATE, STR)
Definition: state.h:56
mutt_addrlist_parse
int mutt_addrlist_parse(struct AddressList *al, const char *s)
Parse a list of email addresses.
Definition: address.c:458
MUTT_ABORT
@ MUTT_ABORT
User aborted the question (with Ctrl-G)
Definition: quad.h:38
mutt_buffer_pool_release
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
Definition: pool.c:112
MUTT_FORMAT_NO_FLAGS
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: format_flags.h:30
Body::tagged
bool tagged
This attachment is tagged.
Definition: body.h:70
mutt_make_post_indent
void mutt_make_post_indent(struct Mailbox *m, struct Email *e, FILE *fp_out, struct ConfigSubset *sub)
Add suffix to replied email text.
Definition: send.c:618
email_new
struct Email * email_new(void)
Create a new Email.
Definition: email.c:72
mutt_bounce_message
int mutt_bounce_message(FILE *fp, struct Mailbox *m, struct Email *e, struct AddressList *to, struct ConfigSubset *sub)
Bounce an email message.
Definition: sendlib.c:1374
State::prefix
char * prefix
String to add to the beginning of each output line.
Definition: state.h:48
EXTRA_SPACE
#define EXTRA_SPACE
MUTT_ALIAS
#define MUTT_ALIAS
Do alias "completion" by calling up the alias-menu.
Definition: mutt.h:57
TAILQ_HEAD_INITIALIZER
#define TAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:630
SEND_NEWS
#define SEND_NEWS
Reply to a news article.
Definition: send.h:54
attach_forward_msgs
static void attach_forward_msgs(FILE *fp, struct Mailbox *m, struct AttachCtx *actx, struct Body *cur, SendFlags flags)
Forward one or several message-type attachments.
Definition: recvcmd.c:651
mutt_resend_message
int mutt_resend_message(FILE *fp, struct Context *ctx, struct Email *e_cur, struct ConfigSubset *sub)
Resend an email.
Definition: send.c:1521
query_quadoption
enum QuadOption query_quadoption(enum QuadOption opt, const char *prompt)
Ask the user a quad-question.
Definition: curs_lib.c:518
attach_include_reply
static void attach_include_reply(FILE *fp, FILE *fp_tmp, struct Mailbox *m, struct Email *e)
This is very similar to send.c's include_reply()
Definition: recvcmd.c:901
JUSTIFY_LEFT
@ JUSTIFY_LEFT
Left justify the text.
Definition: curs_lib.h:48
mutt_buffer_pool_get
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:101
mutt_can_decode
bool mutt_can_decode(struct Body *a)
Will decoding the attachment produce any output.
Definition: handler.c:1805
SEND_TO_SENDER
#define SEND_TO_SENDER
Compose new email to sender.
Definition: send.h:52
C_MimeForwardRest
unsigned char C_MimeForwardRest
Config: Forward all attachments, even if they can't be decoded.
Definition: recvcmd.c:60
MUTT_CHARCONV
#define MUTT_CHARCONV
Do character set conversions.
Definition: state.h:36
C_Bounce
WHERE unsigned char C_Bounce
Config: Confirm before bouncing a message.
Definition: mutt_globals.h:124
mutt_simple_format
void mutt_simple_format(char *buf, size_t buflen, int min_width, int max_width, enum FormatJustify justify, char pad_char, const char *s, size_t n, bool arboreal)
Format a string, like snprintf()
Definition: curs_lib.c:1097
mutt_clear_error
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
Definition: mutt_logging.c:113
count_tagged
static short count_tagged(struct AttachCtx *actx)
Count the number of tagged attachments.
Definition: recvcmd.c:133
mutt_send_message
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Context *ctx, struct EmailList *el, struct ConfigSubset *sub)
Send an email.
Definition: send.c:2012
mutt_addrlist_clear
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
Definition: address.c:1468
AttachPtr::body
struct Body * body
Attachment.
Definition: attach.h:36
emaillist_add_email
int emaillist_add_email(struct EmailList *el, struct Email *e)
Add an Email to a list.
Definition: email.c:151
Email::env
struct Envelope * env
Envelope information.
Definition: email.h:90
MUTT_REPLIED
@ MUTT_REPLIED
Messages that have been replied to.
Definition: mutt.h:95
attach_reply_envelope_defaults
static int attach_reply_envelope_defaults(struct Envelope *env, struct AttachCtx *actx, struct Email *parent, SendFlags flags)
Create the envelope defaults for a reply.
Definition: recvcmd.c:807
SEND_NO_FLAGS
#define SEND_NO_FLAGS
No flags are set.
Definition: send.h:40
mutt_buffer_string
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:77
mutt_env_new
struct Envelope * mutt_env_new(void)
Create a new Envelope.
Definition: envelope.c:42
MuttWindow::state
struct WindowState state
Current state of the Window.
Definition: mutt_window.h:120
STAILQ_HEAD_INITIALIZER
#define STAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:321
check_all_msg
static bool check_all_msg(struct AttachCtx *actx, struct Body *cur, bool err)
Are all the Attachments RFC822 messages?
Definition: recvcmd.c:92
C_Weed
bool C_Weed
Config: Filter headers when displaying/forwarding/printing/replying.
Definition: globals.c:40
mutt_str_cat
char * mutt_str_cat(char *buf, size_t buflen, const char *s)
Concatenate two strings.
Definition: string.c:385
Envelope::from
struct AddressList from
Email's 'From' list.
Definition: envelope.h:57
State
Keep track when processing files.
Definition: state.h:44
MUTT_WEED
#define MUTT_WEED
Weed headers even when not in display mode.
Definition: state.h:35
NeoMutt
Container for Accounts, Notifications.
Definition: neomutt.h:36
mutt_body_handler
int mutt_body_handler(struct Body *b, struct State *s)
Handler for the Body of an email.
Definition: handler.c:1595
check_can_decode
static bool check_can_decode(struct AttachCtx *actx, struct Body *cur)
Can we decode all tagged attachments?
Definition: recvcmd.c:116
AttachCtx::idx
struct AttachPtr ** idx
Array of attachments.
Definition: attach.h:54
mutt_body_copy
int mutt_body_copy(FILE *fp, struct Body **tgt, struct Body *src)
Create a send-mode duplicate from a receive-mode body.
Definition: mutt_body.c:48
NeoMutt::sub
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:39
email_free
void email_free(struct Email **ptr)
Free an Email.
Definition: email.c:43
C_IndentString
WHERE char * C_IndentString
Config: String used to indent 'reply' text.
Definition: mutt_globals.h:102
OptNewsSend
WHERE bool OptNewsSend
(pseudo) used to change behavior when posting
Definition: options.h:46
mutt_get_field
int mutt_get_field(const char *field, char *buf, size_t buflen, CompletionFlags complete, bool multiple, char ***files, int *numfiles)
Ask the user for a string.
Definition: curs_lib.c:311
Body::email
struct Email * email
header information for message/rfc822
Definition: body.h:55
WindowState::cols
short cols
Number of columns, can be MUTT_WIN_SIZE_UNLIMITED.
Definition: mutt_window.h:57
State::flags
StateFlags flags
Flags, e.g. MUTT_DISPLAY.
Definition: state.h:49
Email
The envelope/body of an email.
Definition: email.h:37
mutt_message
#define mutt_message(...)
Definition: logging.h:83
mutt_set_flag
#define mutt_set_flag(m, e, flag, bf)
Definition: protos.h:67
emaillist_clear
void emaillist_clear(struct EmailList *el)
Drop a private list of Emails.
Definition: email.c:130
attach_forward_bodies
static void attach_forward_bodies(FILE *fp, struct Mailbox *m, struct Email *e, struct AttachCtx *actx, struct Body *cur, short nattach)
forward one or several MIME bodies
Definition: recvcmd.c:476
mutt_fetch_recips
int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, SendFlags flags, struct ConfigSubset *sub)
Generate recpients for a reply email.
Definition: send.c:799
AttachCtx::idxlen
short idxlen
Number of attachmentes.
Definition: attach.h:55
find_parent
static struct AttachPtr * find_parent(struct AttachCtx *actx, struct Body *cur, short nattach)
Find the parent of an Attachment.
Definition: recvcmd.c:382
Email::body
struct Body * body
List of MIME parts.
Definition: email.h:91
mutt_error
#define mutt_error(...)
Definition: logging.h:84
mutt_str_copy
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:716