Create a send-mode duplicate from a receive-mode body.
49{
50 if (!tgt || !src)
51 return -1;
52
53 struct Body *b = NULL;
56
58 {
59 use_disp = true;
61 }
62 else
63 {
64 use_disp = false;
65 }
66
69 {
71 return -1;
72 }
73
75 b = *tgt;
76
77 memcpy(b, src,
sizeof(
struct Body));
81
85
88
93
94
98
101
105
106
107
109
110
111 struct Parameter *np = NULL, *new_param = NULL;
113 {
118 }
119
122 return 0;
123}
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
struct Body * mutt_body_new(void)
Create a new Body.
char * mutt_str_dup(const char *str)
Copy a string, safely.
int mutt_save_attachment(FILE *fp, struct Body *m, const char *path, enum SaveAttach opt, struct Email *e)
Save an attachment.
@ MUTT_SAVE_NO_FLAGS
No flags set.
bool mutt_is_text_part(struct Body *b)
Is this part of an email in plain text?
void mutt_adv_mktemp(struct Buffer *buf)
Create a temporary file.
struct Parameter * mutt_param_new(void)
Create a new Parameter.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_INSERT_HEAD(head, elm, field)
void mutt_stamp_attachment(struct Body *a)
Timestamp an Attachment.
char * language
content-language (RFC8255)
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
char * xtype
content-type if x-unknown
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.
char * charset
Send mode: charset of attached file as stored on disk.
struct ParameterList parameter
Parameters of the content-type.
struct AttachPtr * aptr
Menu information, used in recvattach.c.
bool use_disp
Content-Disposition uses filename= ?
struct Email * email
header information for message/rfc822
char * description
content-description
struct Content * content
Detailed info about the content of the attachment.
struct Body * next
next attachment in the list
char * subtype
content-type subtype
char * form_name
Content-Disposition form-data name param.
char * filename
When sending a message, this is the file to which this structure refers.
String manipulation buffer.
Attribute associated with a MIME part.
char * attribute
Parameter name.
char * value
Parameter value.