class email::MimeUtil
sys::Obj email::MimeUtil
Utilities to deal with all the idiosyncrasies of MIME.
- toAddrSpec
-
static Str toAddrSpec(Str addr)
Return the addr-spec or "local@domain" part of an email address string. The result is always returned as "<addr>". The addresses may be formatted with or without a display name:
bob@acme.com => <bob@acme.com> Bob Smith <bob@acme.com> => <bob@acme.com> "Bob Smith" <bob@acme.com> => <bob@acme.com>
- toEncodedWord
-
static Str toEncodedWord(Str text)
Encode the specified text into a "encoded word" according to RFC 2047. If text is pure ASCII, then it is returned as is. Otherwise encode using UTF-8 Base64.