Create a send-mode duplicate from a receive-mode body.
50{
51 if (!b_dst || !b_src)
52 return -1;
53
54 struct Body *b = NULL;
57
59 {
60 use_disp = true;
62 }
63 else
64 {
65 use_disp = false;
66 }
67
70 {
72 return -1;
73 }
74
76 b = *b_dst;
77
78 memcpy(b, b_src,
sizeof(
struct Body));
82
87
90
95
96
100
103
107
108
109
111
112
113 struct Parameter *np = NULL, *new_param = NULL;
115 {
120 }
121
124 return 0;
125}
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 *b, const char *path, enum SaveAttach opt, struct Email *e)
Save an attachment.
@ MUTT_SAVE_NO_FLAGS
No flags set.
bool mutt_is_text_part(const 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 *b)
Timestamp an Attachment.
char * language
content-language (RFC8255)
char * content_id
Content-Id (RFC2392)
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.