Nick Wellnhofer > Email-MIME-RFC2047-0.91 > Email::MIME::RFC2047::AddressList

Download:
Email-MIME-RFC2047-0.91.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.91   Source  

NAME ^

Email::MIME::RFC2047::AddressList - Handling of MIME encoded address lists

SYNOPSIS ^

 use Email::MIME::RFC2047::AddressList;

 my $address_list = Email::MIME::RFC2047::AddressList->parse($string);
 my @items = $address_list->items();

 my $address_list = Email::MIME::RFC2047::AddressList->new();
 $address_list->push($mailbox);
 $address_list->push($group);
 $email->header_set('To', $address_list->format());

DESCRIPTION ^

This module handles RFC 2822 'address-lists'.

CLASS METHODS ^

parse

 my $address_list = Email::MIME::RFC2047::AddressList->parse(
    $string, [$decoder]
 );

Parse a RFC 2822 'address-list'. Returns a Email::MIME::RFC2047::AddressList object containing Email::MIME::RFC2047::Address items.

CONSTRUCTOR ^

new

 my $address_list = Email::MIME::RFC2047::AddressList->new([@items]);

Creates a new Email::MIME::RFC2047::AddressList object, with optional items @items.

METHODS ^

items

 my @items = $address_list->items();

Gets the items of the address list.

push

 $address_list->address(@items);

Appends items to the address list.

format

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

Returns the formatted address list 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.

AUTHOR ^

Nick Wellnhofer <wellnhofer@aevum.de>

COPYRIGHT AND LICENSE ^

Copyright (C) Nick Wellnhofer, 2009

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: