.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Mail::Field::AddrList 3pm" .TH Mail::Field::AddrList 3pm "2016-12-27" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Mail::Field::AddrList \- object representation of e\-mail address lists .SH "INHERITANCE" .IX Header "INHERITANCE" .Vb 2 \& Mail::Field::AddrList \& is a Mail::Field .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Mail::Field::AddrList; \& \& $to = Mail::Field\->new(\*(AqTo\*(Aq); \& $from = Mail::Field\->new(\*(AqFrom\*(Aq, \*(Aqpoe@daimi.aau.dk (Peter Orbaek)\*(Aq); \& \& $from\->create(\*(Aqfoo@bar.com\*(Aq => \*(AqMr. Foo\*(Aq, poe => \*(AqPeter\*(Aq); \& $from\->parse(\*(Aqfoo@bar.com (Mr Foo), Peter Orbaek \*(Aq); \& \& # make a RFC822 header string \& print $from\->stringify(),"\en"; \& \& # extract e\-mail addresses and names \& @addresses = $from\->addresses(); # strings \& @names = $from\->names(); # strings \& @addr = $from\->addr_list(); # Mail::Address objects (v2.00) \& \& # adjoin a new address to the list \& $from\->set_address(\*(Aqfoo@bar.com\*(Aq, \*(AqMr. Foo\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Defines parsing and formatting of address field, for the following fields: \f(CW\*(C`To\*(C'\fR, \f(CW\*(C`From\*(C'\fR, \f(CW\*(C`Cc\*(C'\fR, \f(CW\*(C`Reply\-To\*(C'\fR, and \f(CW\*(C`Sender\*(C'\fR. .PP All the normally used features of the address field specification of \&\s-1RFC2822\s0 are implemented, but some complex (and therefore hardly ever used) constructs will not be understood. Use Mail::Message::Field::Full in MailBox if you need full \s-1RFC\s0 compliance. .PP Extends \*(L"\s-1DESCRIPTION\*(R"\s0 in Mail::Field. .SH "METHODS" .IX Header "METHODS" Extends \*(L"\s-1METHODS\*(R"\s0 in Mail::Field. .SS "Constructors" .IX Subsection "Constructors" Extends \*(L"Constructors\*(R" in Mail::Field. .IP "Mail::Field::AddrList\->\fBcombine\fR(\s-1FIELDS\s0)" 4 .IX Item "Mail::Field::AddrList->combine(FIELDS)" Inherited, see \*(L"Constructors\*(R" in Mail::Field .IP "Mail::Field::AddrList\->\fBextract\fR( \s-1TAG, HEAD\s0 [, \s-1INDEX \s0] )" 4 .IX Item "Mail::Field::AddrList->extract( TAG, HEAD [, INDEX ] )" Inherited, see \*(L"Constructors\*(R" in Mail::Field .IP "Mail::Field::AddrList\->\fBnew\fR( \s-1TAG\s0 [, \s-1STRING\s0 | \s-1OPTIONS\s0] )" 4 .IX Item "Mail::Field::AddrList->new( TAG [, STRING | OPTIONS] )" Inherited, see \*(L"Constructors\*(R" in Mail::Field .ie n .SS """Fake"" constructors" .el .SS "``Fake'' constructors" .IX Subsection "Fake constructors" Extends "\*(L"Fake\*(R" constructors" in Mail::Field. .ie n .IP "$obj\->\fBcreate\fR(\s-1OPTIONS\s0)" 4 .el .IP "\f(CW$obj\fR\->\fBcreate\fR(\s-1OPTIONS\s0)" 4 .IX Item "$obj->create(OPTIONS)" Inherited, see "\*(L"Fake\*(R" constructors" in Mail::Field .ie n .IP "$obj\->\fBparse\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBparse\fR()" 4 .IX Item "$obj->parse()" Inherited, see "\*(L"Fake\*(R" constructors" in Mail::Field .SS "Accessors" .IX Subsection "Accessors" Extends \*(L"Accessors\*(R" in Mail::Field. .ie n .IP "$obj\->\fBset\fR(\s-1OPTIONS\s0)" 4 .el .IP "\f(CW$obj\fR\->\fBset\fR(\s-1OPTIONS\s0)" 4 .IX Item "$obj->set(OPTIONS)" Inherited, see \*(L"Accessors\*(R" in Mail::Field .ie n .IP "$obj\->\fBstringify\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBstringify\fR()" 4 .IX Item "$obj->stringify()" Inherited, see \*(L"Accessors\*(R" in Mail::Field .ie n .IP "$obj\->\fBtag\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBtag\fR()" 4 .IX Item "$obj->tag()" .PD 0 .IP "Mail::Field::AddrList\->\fBtag\fR()" 4 .IX Item "Mail::Field::AddrList->tag()" .PD Inherited, see \*(L"Accessors\*(R" in Mail::Field .SS "Smart accessors" .IX Subsection "Smart accessors" Extends \*(L"Smart accessors\*(R" in Mail::Field. .ie n .IP "$obj\->\fBaddr_list\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBaddr_list\fR()" 4 .IX Item "$obj->addr_list()" Returns the collected Mail::Address objects. .ie n .IP "$obj\->\fBaddresses\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBaddresses\fR()" 4 .IX Item "$obj->addresses()" Returns a list if email addresses, found in the field content. .ie n .IP "$obj\->\fBnames\fR()" 4 .el .IP "\f(CW$obj\fR\->\fBnames\fR()" 4 .IX Item "$obj->names()" Returns a list of nicely formatted named, for each of the addresses found in the content. .ie n .IP "$obj\->\fBset_address\fR(\s-1EMAIL, NAME\s0)" 4 .el .IP "\f(CW$obj\fR\->\fBset_address\fR(\s-1EMAIL, NAME\s0)" 4 .IX Item "$obj->set_address(EMAIL, NAME)" Add/replace an \s-1EMAIL\s0 address to the field. .ie n .IP "$obj\->\fBtext\fR( [\s-1STRING\s0] )" 4 .el .IP "\f(CW$obj\fR\->\fBtext\fR( [\s-1STRING\s0] )" 4 .IX Item "$obj->text( [STRING] )" Inherited, see \*(L"Smart accessors\*(R" in Mail::Field .SH "DETAILS" .IX Header "DETAILS" Extends \*(L"\s-1DETAILS\*(R"\s0 in Mail::Field. .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .IP "Error: Undefined subroutine called" 4 .IX Item "Error: Undefined subroutine called" Mail::Field objects use autoloading to compile new functionality. Apparently, the method called is not implemented for the specific class of the field object. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of the MailTools distribution, \&\fIhttp://perl.overmeer.net/mailtools/\fR. .SH "AUTHORS" .IX Header "AUTHORS" The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development. .PP Mail::Cap by Gisle Aas . Mail::Field::AddrList by Peter Orbaek . Mail::Mailer and Mail::Send by Tim Bunce . For other contributors see ChangeLog. .SH "LICENSE" .IX Header "LICENSE" Copyrights 1995\-2000 Graham Barr and 2001\-2007 Mark Overmeer . .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://www.perl.com/perl/misc/Artistic.html\fR