Create temporary files for all attachments.
361{
362 struct Body *b = NULL;
363 struct State state = { 0 };
364
365 state.
fp_in = fp_body;
366
367 for (b = body; b; b = b->
next)
368 {
370 {
372 {
373 return -1;
374 }
375 }
376 else
377 {
380 {
383 }
384 else
385 {
386
388 }
389
390
391
393
395 {
397 {
399 }
400 else
401 {
404 }
405
407 }
408
412 return -1;
413
420 {
422 {
424 {
426 return -1;
427 }
431 }
432
434 {
437 return -1;
438 }
439
440
441 if ((b == body) && !protected_headers)
442 {
445 }
446
452 }
453 else
454 {
456 }
457
459 return -1;
460
463
465
469 }
470 }
471
472 return 0;
473}
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.
@ 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.