#include <stdio.h>
Go to the source code of this file.
Convenience wrapper for the send headers
- Authors
-
- Copyright
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file body.h.
◆ mutt_write_mime_body()
int mutt_write_mime_body |
( |
struct Body * |
a, |
|
|
FILE * |
fp, |
|
|
struct ConfigSubset * |
sub |
|
) |
| |
Write a MIME part.
- Parameters
-
a | Body to use |
fp | File to write to |
sub | Config Subset |
- Return values
-
Definition at line 314 of file body.c.
326 mutt_error(
_(
"No boundary parameter found [report this error]"));
334 fprintf(
fp,
"\n--%s\n", boundary);
341 fprintf(
fp,
"\n--%s--\n", boundary);
342 return ferror(
fp) ? -1 : 0;
349 fputs(
"Version: 1\n",
fp);
363 char send_charset[128];
390 return ferror(
fp) ? -1 : 0;
@ ENC_QUOTED_PRINTABLE
Quoted-printable text.
bool noconv
Don't do character set conversion.
WHERE SIG_ATOMIC_VOLATILE_T SigInt
true after SIGINT is received
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
struct Body * next
next attachment in the list
#define MUTT_ICONV_NO_FLAGS
No flags are set.
static void encode_8bit(struct FgetConv *fc, FILE *fp_out)
Write the data as raw 8-bit data.
@ LL_DEBUG1
Log at debug level 1.
unsigned int encoding
content-transfer-encoding, ContentEncoding
char * subtype
content-type subtype
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
static bool write_as_text_part(struct Body *b)
Should the Body be written as a text MIME part.
int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
Copy the contents of one file into another.
int mutt_write_mime_body(struct Body *a, FILE *fp, struct ConfigSubset *sub)
Write a MIME part.
void mutt_sig_allow_interrupt(bool allow)
Allow/disallow Ctrl-C (SIGINT)
#define APPLICATION_PGP
Use PGP to encrypt/sign.
char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
Get a body's character set.
struct Body * parts
parts of a multipart or message/rfc822
char * charset
Send mode: charset of attached file as stored on disk.
#define mutt_debug(LEVEL,...)
static void encode_base64(struct FgetConv *fc, FILE *fp_out, int istext)
Base64-encode some data.
char * mutt_param_get(const struct ParameterList *pl, const char *s)
Find a matching Parameter.
@ TYPE_APPLICATION
Type: 'application/*'.
void mutt_ch_fgetconv_close(struct FgetConv **fc)
Close an fgetconv handle.
@ ENC_BASE64
Base-64 encoded text.
@ TYPE_TEXT
Type: 'text/*'.
unsigned int type
content-type primary type, ContentType
struct ParameterList parameter
parameters of the content-type
struct FgetConv * mutt_ch_fgetconv_open(FILE *fp, const char *from, const char *to, uint8_t flags)
Prepare a file for charset conversion.
Cursor for converting a file's encoding.
@ TYPE_MULTIPART
Type: 'multipart/*'.
static void encode_quoted(struct FgetConv *fc, FILE *fp_out, bool istext)
Encode text as quoted printable.
char * filename
when sending a message, this is the file to which this structure refers
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)