1mail::emailAddress(3x)Extra/Miscellaneous objects/methodsmail::emailAddress(3x)
2
3
4
6 mail::emailAddress - An E-mail address
7
9 #include <libmail/rfcaddr.H>
10
11
12 std::string addr=address.getAddr();
13 std::string name=address.getAddrName();
14
15 address.setAddr(addr);
16 address.setAddrName(name);
17
19 mail::emailAddress is a subclass of mail::address that defines two new
20 methods: getAddrName(), setAddrName(), which retrieve or set the name
21 component of an E-mail address using the native character set. For
22 most purposes, using mail::emailAddress is preferrable to using
23 mail::address. mail::address's getName() and setName() methods deal
24 with the raw, MIME-encoded format of E-mail address names (see RFC
25 2047).
26
27 Convert a native name to its MIME-encoded format by using setAddrName()
28 followed by getName(). Similarly, decoded a MIME-encoded name by using
29 setName() followed by getAddrName().
30
31 The toString and fromString methods are templates, and may be used with
32 a vector of mail::emailAddress or mail::address objects. The two
33 classes are completely interchangable. A mail::emailAddress object may
34 be assigned or converted to a mail::address, and vice-versa.
35
37 mail::address(3x), mail::setappcharset(3x).
38
39
40
41 10 April 2006 mail::emailAddress(3x)