32struct mail::SimpleEmail::Data {
56 for (
auto const& e : headers()) {
57 if (e.first ==
"MIME-Version" || (data->quotedPrintableEncode && e.first ==
"Content-Transfer-Encoding"))
59 ret << e.first <<
": " << e.second <<
"\r\n";
62 ret <<
"MIME-Version: 1.0\r\n";
63 if (data->quotedPrintableEncode) {
64 ret <<
"Content-Transfer-Encoding: quoted-printable\r\n\r\n";
Structure representing a basic email.
Namespace containing functions for text encoding and decoding.
#define NAWA_PRIMITIVE_DATA_ACCESSORS_IMPL(Class, Member, Type)
#define NAWA_COMPLEX_DATA_ACCESSORS_IMPL(Class, Member, Type)
#define NAWA_DEFAULT_CONSTRUCTOR_IMPL_WITH_NS(Namespace, Class)
#define NAWA_MOVE_CONSTRUCTOR_DERIVED_IMPL_WITH_NS(Namespace, Class, Parent)
#define NAWA_COPY_ASSIGNMENT_OPERATOR_DERIVED_IMPL(Class, Parent)
#define NAWA_MOVE_ASSIGNMENT_OPERATOR_DERIVED_IMPL(Class, Parent)
#define NAWA_COPY_CONSTRUCTOR_DERIVED_IMPL_WITH_NS(Namespace, Class, Parent)
#define NAWA_DEFAULT_DESTRUCTOR_IMPL_WITH_NS(Namespace, Class)
std::string quotedPrintableEncode(std::string const &input, std::string const &lineEnding="\r\n", bool replaceCrlf=false, bool qEncoding=false)
std::unordered_map< std::string, std::string > ReplacementRules
std::string stringReplace(std::string input, std::unordered_map< char, char > const &patterns)
Contains useful functions that improve the readability and facilitate maintenance of the NAWA code.