NAME

Email::MIME::RFC2047::Address - MIME encoded addresses

VERSION

version 0.97

SYNOPSIS

use Email::MIME::RFC2047::Address;

my $address = Email::MIME::RFC2047::Address->parse($string);

if ($address->isa('Email::MIME::RFC2047::Mailbox')) {
    print $address->name,    "\n";
    print $address->address, "\n";
}

my $string = $address->format;

DESCRIPTION

This is the superclass for Email::MIME::RFC2047::Mailbox and Email::MIME::RFC2047::Group.

CLASS METHODS

parse

my $address = Email::MIME::RFC2047::Address->parse($string, [$decoder])

Parses a RFC 2822 address. Returns either a Email::MIME::RFC2047::Mailbox or a Email::MIME::RFC2047::Group object. $decoder is an optional Email::MIME::RFC2047::Decoder. If it isn't provided, a new temporary decoder is used.

METHODS

format

my $string = $address->format([$encoder]);

Returns the formatted address string for use in a message header.

$encoder is an optional Email::MIME::RFC2047::Encoder object used for encoding display names with non-ASCII characters. If it isn't provided, a default UTF-8 encoder will be used.

AUTHOR

Nick Wellnhofer <wellnhofer@aevum.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Nick Wellnhofer.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.