21#ifndef G_STORE_ENVELOPE_H
22#define G_STORE_ENVELOPE_H
43 G_EXCEPTION( ReadError ,
tx(
"cannot read envelope file") )
44 G_EXCEPTION( WriteError ,
tx(
"cannot write envelope file") )
51 static std::size_t
write( std::ostream & ,
const Envelope & ) ;
59 static void copyExtra( std::istream & , std::ostream & ) ;
66 MessageStore::BodyType default_ = MessageStore::BodyType::Unknown ) ;
70 static std::string
smtpBodyType( MessageStore::BodyType ) ;
76 bool utf8_mailboxes {
false} ;
77 MessageStore::BodyType body_type {MessageStore::BodyType::Unknown} ;
81 std::string authentication ;
82 std::string client_socket_address ;
83 std::string client_certificate ;
84 std::string from_auth_in ;
85 std::string from_auth_out ;
86 std::string forward_to ;
87 std::string forward_to_address ;
88 std::string client_account_selector ;
89 std::size_t endpos {0U} ;
A structure containing the contents of an envelope file, with support for file reading,...
static void copyExtra(std::istream &, std::ostream &)
A convenience function to copy extra envelope lines from an envelope input stream to an output stream...
static std::size_t write(std::ostream &, const Envelope &)
Writes an envelope to a seekable stream.
static std::string smtpBodyType(MessageStore::BodyType)
Converts a body type enum into the corresponding SMTP keyword.
static void read(std::istream &, Envelope &)
Reads an envelope from a stream.
static MessageStore::BodyType parseSmtpBodyType(const std::string &, MessageStore::BodyType default_=MessageStore::BodyType::Unknown)
Parses an SMTP MAIL-FROM BODY= parameter.
std::vector< std::string > StringArray
A std::vector of std::strings.
constexpr const char * tx(const char *p) noexcept
A briefer alternative to G::gettext_noop().