{"id":7363,"date":"2022-12-20T19:37:50","date_gmt":"2022-12-20T22:37:50","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/mailfieldaddrlist-man3\/"},"modified":"2022-12-20T19:37:50","modified_gmt":"2022-12-20T22:37:50","slug":"mailfieldaddrlist-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/mailfieldaddrlist-man3\/","title":{"rendered":"Mail::Field::AddrList (man3)"},"content":{"rendered":"<h1 align=\"center\">Mail::Field::AddrList<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#INHERITANCE\">INHERITANCE<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a><br \/> <a href=\"#DETAILS\">DETAILS<\/a><br \/> <a href=\"#DIAGNOSTICS\">DIAGNOSTICS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a><br \/> <a href=\"#LICENSE\">LICENSE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Mail::Field::AddrList \u2212 object representation of e\u2212mail address lists<\/p>\n<h2>INHERITANCE <a name=\"INHERITANCE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Mail::Field::AddrList <br \/> is a Mail::Field<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">use Mail::Field::AddrList; <br \/> $to = Mail::Field\u2212>new(&#8216;To&#8217;); <br \/> $from = Mail::Field\u2212>new(&#8216;From&#8217;, &#8216;poe@daimi.aau.dk (Peter Orbaek)&#8217;); <br \/> $from\u2212>create(&#8216;foo@bar.com&#8217; => &#8216;Mr. Foo&#8217;, poe => &#8216;Peter&#8217;); <br \/> $from\u2212>parse(&#8216;foo@bar.com (Mr Foo), Peter Orbaek <poe>&#8216;); <br \/> # make a RFC822 header string <br \/> print $from\u2212>stringify(),&#8221;n&#8221;; <br \/> # extract e\u2212mail addresses and names <br \/> @addresses = $from\u2212>addresses(); # strings <br \/> @names = $from\u2212>names(); # strings <br \/> @addr = $from\u2212>addr_list(); # Mail::Address objects (v2.00) <br \/> # adjoin a new address to the list <br \/> $from\u2212>set_address(&#8216;foo@bar.com&#8217;, &#8216;Mr. Foo&#8217;);<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Defines parsing and formatting of address field, for the following fields: &#8220;To&#8221;, &#8220;From&#8221;, &#8220;Cc&#8221;, &#8220;Reply\u2212To&#8221;, and &#8220;Sender&#8221;.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">All the normally used features of the address field specification of <small>RFC2822<\/small> 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 <small>RFC<\/small> compliance.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Extends &#8221; <small>DESCRIPTION&#8221;<\/small> in Mail::Field.<\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Extends &#8221; <small>METHODS&#8221;<\/small> in Mail::Field.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Constructors<\/b> <br \/> Extends &#8220;Constructors&#8221; in Mail::Field. <br \/> Mail::Field::AddrList\u2212><b>combine<\/b>($fields)<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;Constructors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%;\">Mail::Field::AddrList\u2212><b>extract<\/b>( $tag, $head [, $index ] )<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;Constructors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%;\">Mail::Field::AddrList\u2212><b>new<\/b>( $tag [, <small>STRING<\/small> | %options] )<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;Constructors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>&#8220;Fake&#8221; constructors<\/b> <br \/> Extends &#8220;&#8221;Fake&#8221; constructors&#8221; in Mail::Field. <br \/> $obj\u2212><b>create<\/b>(%options)<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;&#8221;Fake&#8221; constructors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%;\">$obj\u2212><b>parse<\/b>()<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;&#8221;Fake&#8221; constructors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Accessors<\/b> <br \/> Extends &#8220;Accessors&#8221; in Mail::Field. <br \/> $obj\u2212><b>set<\/b>(%options)<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;Accessors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%;\">$obj\u2212><b>stringify<\/b>()<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;Accessors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%;\">$obj\u2212><b>tag<\/b>() <br \/> Mail::Field::AddrList\u2212><b>tag<\/b>()<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;Accessors&#8221; in Mail::Field<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Smart accessors<\/b> <br \/> Extends &#8220;Smart accessors&#8221; in Mail::Field. <br \/> $obj\u2212><b>addr_list<\/b>()<\/p>\n<p style=\"margin-left:17%;\">Returns the collected Mail::Address objects.<\/p>\n<p style=\"margin-left:11%;\">$obj\u2212><b>addresses<\/b>()<\/p>\n<p style=\"margin-left:17%;\">Returns a list if email addresses, found in the field content.<\/p>\n<p style=\"margin-left:11%;\">$obj\u2212><b>names<\/b>()<\/p>\n<p style=\"margin-left:17%;\">Returns a list of nicely formatted named, for each of the addresses found in the content.<\/p>\n<p style=\"margin-left:11%;\">$obj\u2212><b>set_address<\/b>($email, $name)<\/p>\n<p style=\"margin-left:17%;\">Add\/replace an $email address to the field.<\/p>\n<p style=\"margin-left:11%;\">$obj\u2212><b>text<\/b>( [ <small>STRING<\/small> ] )<\/p>\n<p style=\"margin-left:17%;\">Inherited, see &#8220;Smart accessors&#8221; in Mail::Field<\/p>\n<h2>DETAILS <a name=\"DETAILS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Extends &#8221; <small>DETAILS&#8221;<\/small> in Mail::Field.<\/p>\n<h2>DIAGNOSTICS <a name=\"DIAGNOSTICS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Error: Undefined subroutine <method> called<\/p>\n<p style=\"margin-left:17%;\">Mail::Field objects use autoloading to compile new functionality. Apparently, the method called is not implemented for the specific class of the field object.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This module is part of the MailTools distribution, <i>http:\/\/perl.overmeer.net\/mailtools\/<\/i>.<\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance without commitment to further development.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Mail::Cap by Gisle Aas <aas@oslonett.no>. Mail::Field::AddrList by Peter Orbaek <poe@cit.dk>. Mail::Mailer and Mail::Send by Tim Bunce <Tim.Bunce@ig.co.uk>. For other contributors see ChangeLog.<\/p>\n<h2>LICENSE <a name=\"LICENSE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyrights 1995\u22122000 Graham Barr <gbarr@pobox.com> and 2001\u22122017 Mark Overmeer <perl@overmeer.net>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is free software; you can redistribute it and\/or modify it under the same terms as Perl itself. See <i>http:\/\/www.perl.com\/perl\/misc\/Artistic.html<\/i><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  Mail::Field::AddrList \u2212 object representation of e\u2212mail address lists <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3677,3007],"class_list":["post-7363","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-mailfieldaddrlist","tag-man3"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=7363"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/7363\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=7363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=7363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=7363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}