1MAIL::HEADER::ADDRES(3x)Cone: COnsole Newsreader And EMAIL::HEADER::ADDRES(3x)
2
3
4

NAME

6       mail::Header::addresslist - An E-mail header that contains addresses.
7

SYNOPSIS

9       #include <libmail/headers.H>
10
11       std::vector<mail::emailAddress> address_list;
12       mail::emailAddress addr;
13
14       mail::Header::addresslist tohdr("To", address_list);
15
16       mail::Header::addresslist cchdr("Cc")("John", "john@example.com")
17                                            ("Tom", "tom@example.com")
18                                            (addr);
19
20       std::cout << tohdr.toString();
21
22

USAGE

24       This class creates a header that contains addresses, such as the “To:”
25       or the “Cc:” header. Two arguments are provided to the constructor: the
26       header´s name, and a vector containing the addresses.
27
28       This is not the appropriate class to create structured MIME headers.
29       Use mail::Header::mime(3x) to create structured MIME headers.
30
31       The toString() returns the header as a single text string: “name:
32       value”. Long headers are folded accordingly.
33
34   Dynamic address list generation
35       This class has an alternative constructor that receives a single
36       parameter: the header´s name, which initializes an empty address list.
37       The address list is populated by repeatedly calling the “()” operator.
38
39       One version of the “()” operator receives the explicit name and address
40       components of an E-mail address. Alternatively, a mail::emailAddress
41       object may be provided.
42

SEE ALSO

44       mail::Header::encoded(3x), mail::Header::list(3x),
45       mail::Header::mime(3x), mail::Header::plain(3x).
46
47
48
49[FIXME: source]                   05/08/2010          MAIL::HEADER::ADDRES(3x)
Impressum