Rechercher une page de manuel
mail::emailAddress.3x
Langue: en
Version: 11/28/2008 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
NAME
mail::emailAddress - An E-mail addressSYNOPSIS
-
#include <libmail/rfcaddr.H> mail::emailAddress address("Jóse Smith", "josesmith@example.com"); std::string addr=address.getAddr(); std::string name=address.getAddrName(); address.setAddr(addr); address.setAddrName(name);
USAGE
mail::emailAddress is a subclass of mail::address that defines two new methods: getAddrName(), setAddrName(), which retrieve or set the name component of an E-mail address using the native character set. For most purposes, using mail::emailAddress is preferrable to using mail::address. mail::address's getName() and setName() methods deal with the raw, MIME-encoded format of E-mail address names (see RFC 2047[1]).
Convert a native name to its MIME-encoded format by using setAddrName() followed by getName(). Similarly, decoded a MIME-encoded name by using setName() followed by getAddrName().
The toString and fromString methods are templates, and may be used with a vector of mail::emailAddress or mail::address objects. The two classes are completely interchangable. A mail::emailAddress object may be assigned or converted to a mail::address, and vice-versa.
SEE ALSO
mail::address(3x), mail::setappcharset(3x).
NOTES
- 1.
- RFC 2047
- http://www.rfc-editor.org/rfc/rfc2047.txt
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre