Prepare a message template.
659 struct Body *b = NULL;
660 FILE *fp_body = NULL;
662 struct State s = { 0 };
664 struct Envelope *protected_headers = NULL;
676 fseeko(fp, e->
offset, SEEK_SET);
726 "application/pgp-signature"))
759 for (b = e_new->
body; b; b = b->
next)
817 if ((b == e_new->
body) && !protected_headers)
828 else if (((
WithCrypto & APPLICATION_SMIME) != 0) &&
831 if (sec_type & SEC_ENCRYPT)
885 e_new->
security &= ~APPLICATION_PGP;
887 e_new->
security &= ~APPLICATION_SMIME;
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
void mutt_decode_attachment(struct Body *b, struct State *s)
Decode an email's attachment.
void mutt_stamp_attachment(struct Body *a)
Timestamp an Attachment.
char * filename
when sending a message, this is the file to which this structure refers
struct Envelope * mime_headers
Memory hole protected headers.
void mutt_buffer_reset(struct Buffer *buf)
Reset an existing Buffer.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
struct AddressList mail_followup_to
Email's 'mail-followup-to'.
struct Body * body
List of MIME parts.
#define MUTT_CHARCONV
Do character set conversions.
#define mutt_message(...)
#define SEC_ENCRYPT
Email is encrypted.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
bool noconv
Don't do character set conversion.
String manipulation buffer.
bool C_CryptProtectedHeadersRead
Config: Display protected headers (Memory Hole) in the pager.
char * mutt_str_dup(const char *str)
Copy a string, safely.
struct Body * next
next attachment in the list
FILE * fp_out
File to write to.
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
FILE * fp_in
File to read from.
#define SEC_INLINE
Email has an inline signature.
StateFlags flags
Flags, e.g. MUTT_DISPLAY.
int mx_msg_close(struct Mailbox *m, struct Message **msg)
Close a message.
bool crypt_valid_passphrase(SecurityFlags flags)
Check that we have a usable passphrase, ask if not.
char * message_id
Message ID.
SecurityFlags mutt_is_multipart_encrypted(struct Body *b)
Does the message have encrypted parts?
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
struct Envelope * env
Envelope information.
SecurityFlags mutt_is_multipart_signed(struct Body *b)
Is a message signed?
void mutt_rfc3676_space_unstuff(struct Email *e)
Remove RFC3676 space stuffing.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * subtype
content-type subtype
void mutt_param_delete(struct ParameterList *pl, const char *attribute)
Delete a matching Parameter.
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
bool C_SmimeIsDefault
Config: Use SMIME rather than PGP by default.
SecurityFlags mutt_is_application_pgp(struct Body *m)
Does the message use PGP?
struct Body * mutt_remove_multipart(struct Body *b)
Extract the multipart body if it exists.
#define APPLICATION_PGP
Use PGP to encrypt/sign.
A local copy of an email.
LOFF_T length
length (in bytes) of attachment
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
void crypt_smime_getkeys(struct Envelope *env)
Wrapper for CryptModuleSpecs::smime_getkeys()
struct Body * parts
parts of a multipart or message/rfc822
void mutt_body_free(struct Body **ptr)
Free a Body.
SecurityFlags mutt_is_application_smime(struct Body *m)
Does the message use S/MIME?
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib...
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
unsigned int type
content-type primary type, ContentType
LOFF_T offset
Where in the stream does this message begin?
#define SEC_SIGN
Email is signed.
void mutt_parse_part(FILE *fp, struct Body *b)
Parse a MIME part.
int crypt_pgp_decrypt_mime(FILE *fp_in, FILE **fp_out, struct Body *b, struct Body **cur)
Wrapper for CryptModuleSpecs::decrypt_mime()
char * subject
Email's subject.
Type: 'multipart/*'.
bool use_disp
Content-Disposition uses filename= ?
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
FILE * fp
pointer to the message data
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.
Keep track when processing files.
int mutt_body_handler(struct Body *b, struct State *s)
Handler for the Body of an email.
char * d_filename
filename to be used for the content-disposition header.
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
struct Envelope * mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed)
parses an RFC822 header
struct ParameterList parameter
parameters of the content-type
struct Email * email
header information for message/rfc822
struct Message * mx_msg_open(struct Mailbox *m, int msgno)
return a stream pointer for a message
int msgno
Number displayed to the user.