Create temporary files for all attachments.
359{
360 if (depth > 50)
361 {
363 return -1;
364 }
365
366 struct Body *b = NULL;
367 struct State state = { 0 };
368
369 state.
fp_in = fp_body;
370
371 for (b = body; b; b = b->
next)
372 {
374 {
376 protected_headers, depth + 1) < 0)
377 {
378 return -1;
379 }
380 }
381 else
382 {
385 {
388 }
389 else
390 {
391
393 }
394
395
396
398
400 {
402 {
404 }
405 else
406 {
409 }
410
412 }
413
417 return -1;
418
425 {
427 {
429 {
431 return -1;
432 }
436 }
437
439 {
442 return -1;
443 }
444
445
446 if ((b == body) && !protected_headers)
447 {
450 }
451
457 }
458 else
459 {
461 }
462
464 return -1;
465
468
470
474 }
475 }
476
477 return 0;
478}
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
SecurityFlags mutt_is_application_smime(struct Body *b)
Does the message use S/MIME?
bool crypt_valid_passphrase(SecurityFlags flags)
Check that we have a usable passphrase, ask if not.
SecurityFlags mutt_is_application_pgp(const struct Body *b)
Does the message use PGP?
void crypt_smime_getkeys(struct Envelope *env)
Wrapper for CryptModuleSpecs::smime_getkeys()
void mutt_body_free(struct Body **ptr)
Free a Body.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
#define mutt_message(...)
int mutt_body_handler(struct Body *b, struct State *state)
Handler for the Body of an email.
void mutt_decode_attachment(const struct Body *b, struct State *state)
Decode an email's attachment.
@ LL_DEBUG1
Log at debug level 1.
@ TYPE_MULTIPART
Type: 'multipart/*'.
@ TYPE_TEXT
Type: 'text/*'.
#define STATE_CHARCONV
Do character set conversions.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
void mutt_adv_mktemp(struct Buffer *buf)
Create a temporary file.
char * mutt_param_get(const struct ParameterList *pl, const char *s)
Find a matching Parameter.
void mutt_param_delete(struct ParameterList *pl, const char *attribute)
Delete a matching Parameter.
static int create_tmp_files_for_attachments(FILE *fp_body, struct Buffer *file, struct Email *e_new, struct Body *body, struct Envelope *protected_headers, int depth)
Create temporary files for all attachments.
void mutt_stamp_attachment(struct Body *b)
Timestamp an Attachment.
char * d_filename
filename to be used for the content-disposition header If NULL, filename is used instead.
struct Body * parts
parts of a multipart or message/rfc822
bool noconv
Don't do character set conversion.
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
struct Envelope * mime_headers
Memory hole protected headers.
struct ParameterList parameter
Parameters of the content-type.
bool use_disp
Content-Disposition uses filename= ?
struct Email * email
header information for message/rfc822
struct Body * next
next attachment in the list
char * subtype
content-type subtype
unsigned int type
content-type primary type, ContentType
char * filename
When sending a message, this is the file to which this structure refers.
struct Envelope * env
Envelope information.
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
struct Body * body
List of MIME parts.
Keep track when processing files.
StateFlags flags
Flags, e.g. STATE_DISPLAY.
FILE * fp_out
File to write to.
FILE * fp_in
File to read from.