Create temporary files for all attachments.
359{
360 struct Body *b = NULL;
361 struct State state = { 0 };
362
363 state.
fp_in = fp_body;
364
365 for (b = body; b; b = b->
next)
366 {
368 {
370 {
371 return -1;
372 }
373 }
374 else
375 {
378 {
381 }
382 else
383 {
384
386 }
387
388
389
391
393 {
395 {
397 }
398 else
399 {
402 }
403
405 }
406
410 return -1;
411
418 {
420 {
422 return -1;
426 }
427
429 {
431 return -1;
432 }
433
434
435 if ((b == body) && !protected_headers)
436 {
439 }
440
446 }
447 else
448 {
450 }
451
453 return -1;
454
457
459
463 }
464 }
465
466 return 0;
467}
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_pgp(struct Body *b)
Does the message use PGP?
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.
void crypt_smime_getkeys(struct Envelope *env)
Wrapper for CryptModuleSpecs::smime_getkeys()
void mutt_body_free(struct Body **ptr)
Free a Body.
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
#define mutt_message(...)
int mutt_body_handler(struct Body *b, struct State *state)
Handler for the Body of an email.
void mutt_decode_attachment(struct Body *b, struct State *state)
Decode an email's attachment.
@ 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)
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.