1MAIL::HEADER::ENCODE(3x)Cone: COnsole Newsreader And EMAIL::HEADER::ENCODE(3x)
2
3
4
6 mail::Header::encoded - An unstructured E-mail header.
7
9 #include <libmail/headers.H>
10
11 mail::Header::encoded encoded_header("Subject", subjectStr, "UTF-8", "EN");
12
13 std::cout << encoded_header.toString();
14
15
17 This class creates unstructured E-mail header. Three arguments are
18 provided to the constructor: the header´s name, its content, and the
19 content´s character set. Non-US-ASCII portions of the contents are
20 encoded according to RFC 2047[1].
21
22 The fourth argument to the constructor is optional. If not an empty
23 string, it identifies the content´s language, as described in section 5
24 of RFC 2231[2].
25
26 This is not the appropriate class to create structured MIME headers, or
27 address list headers. Use mail::Header::addresslist(3x) to create
28 headers that contain E-mail addresses. Use mail::Header::mime(3x) to
29 create structured MIME headers.
30
31 The toString() returns the header as a single text string: “name:
32 value”. Long headers are folded at the nearest whitespace.
33
35 mail::Header::addresslist(3x), mail::Header::list(3x),
36 mail::Header::mime(3x), mail::Header::plain(3x).
37
39 1. RFC 2047
40 http://www.rfc-editor.org/rfc/rfc2047.txt
41
42 2. RFC 2231
43 http://www.rfc-editor.org/rfc/rfc2231.txt
44
45
46
47[FIXME: source] 05/08/2010 MAIL::HEADER::ENCODE(3x)