2 #include "../acl_cpp_define.hpp" 4 #include "../stdlib/string.hpp" 5 #include "../stdlib/noncopyable.hpp" 6 #include "../http/http_ctype.hpp" 8 #if !defined(ACL_MIME_DISABLE) 27 const char* encoding =
"base64");
55 mail_body& set_html(
const char* html,
size_t len);
64 mail_body& set_plain(
const char* plain,
size_t len);
75 mail_body& set_alternative(
const char* html,
size_t hlen,
76 const char* plain,
size_t plen);
88 mail_body& set_relative(
const char* html,
size_t hlen,
89 const char* plain,
size_t plen,
90 const std::vector<mail_attach*>& attachments);
128 bool save_to(
ostream& out)
const;
135 bool save_to(
string& out)
const;
144 bool save_html(
const char* in,
size_t len,
string& out)
const;
153 bool save_plain(
const char* in,
size_t len,
string& out)
const;
166 bool save_relative(
const char* html,
size_t hlen,
167 const char* plain,
size_t plen,
168 const std::vector<mail_attach*>& attachments,
180 bool save_alternative(
const char* html,
size_t hlen,
181 const char* plain,
size_t plen,
string& out)
const;
185 string content_type_;
186 string transfer_encoding_;
196 const std::vector<mail_attach*>* attachments_;
198 bool build(
const char* in,
size_t len,
const char* content_type,
199 const char* charset,
mime_code& coder,
string& out)
const;
200 bool build_html(
const char* in,
size_t len,
201 const char* charset,
string& out)
const;
202 bool build_plain(
const char* in,
size_t len,
203 const char* charset,
string& out)
const;
205 void set_content_type(
const char* content_type);
210 #endif // !defined(ACL_MIME_DISABLE)
const std::vector< mail_attach * > * get_attachments() const
const char * get_plain(size_t &len) const
const http_ctype & get_ctype() const
const string & get_content_type() const
const char * get_html(size_t &len) const