{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Address (info)\n\n## NAME\n\nMail::Address - parse mail addresses\n\n## SYNOPSIS\n\nuse Mail::Address;\nmy @addrs = Mail::Address->parse($line);\nforeach $addr (@addrs) {\nprint $addr->format,\"\\n\";\n}\n\n## DESCRIPTION\n\n\"Mail::Address\" extracts and manipulates email addresses from a message\nheader.  It cannot be used to extract addresses from some random text.\nYou can use this module to create RFC822 compliant fields.\n\n## Sections\n\n- **Mail::Address(3pm)    User Contributed Perl Documentation   Mail::Address(3pm)**\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **SEE ALSO**\n- **AUTHORS**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Address",
        "section": "",
        "mode": "info",
        "summary": "Mail::Address - parse mail addresses",
        "synopsis": "use Mail::Address;\nmy @addrs = Mail::Address->parse($line);\nforeach $addr (@addrs) {\nprint $addr->format,\"\\n\";\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Mail::Address(3pm)    User Contributed Perl Documentation   Mail::Address(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 36,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 53,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "Mail::Address(3pm)    User Contributed Perl Documentation   Mail::Address(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Mail::Address - parse mail addresses\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Mail::Address;\nmy @addrs = Mail::Address->parse($line);\n\nforeach $addr (@addrs) {\nprint $addr->format,\"\\n\";\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"Mail::Address\" extracts and manipulates email addresses from a message\nheader.  It cannot be used to extract addresses from some random text.\nYou can use this module to create RFC822 compliant fields.\n\nAlthough \"Mail::Address\" is a very popular subject for books, and is\nused in many applications, it does a very poor job on the more complex\nmessage fields.  It does only handle simple address formats (which\ncovers about 95% of what can be found). Problems are with\n\no   no support for address groups, even not with the semi-colon as\nseparator between addresses;\n\no   limited support for escapes in phrases and comments.  There are\ncases where it can get wrong; and\n\no   you have to take care of most escaping when you create an address\nyourself: \"Mail::Address\" does not do that for you.\n\nOften requests are made to the maintainers of this code improve this\nsituation, but this is not a good idea, where it will break zillions of\nexisting applications.  If you wish for a fully RFC2822 compliant\nimplementation you may take a look at Mail::Message::Field::Full, part\nof MailBox.\n\n. Example\n\nmy $s = Mail::Message::Field::Full->new($fromheader);\n# ref $s isa Mail::Message::Field::Addresses;\n\nmy @g = $s->groups;          # all groups, at least one\n# ref $g[0] isa Mail::Message::Field::AddrGroup;\nmy $ga = $g[0]->addresses;   # group addresses\n\nmy @a = $s->addresses;       # all addresses\n# ref $a[0] isa Mail::Message::Field::Address;\n",
                "subsections": []
            },
            "METHODS": {
                "content": "Constructors\nMail::Address->new( $phrase, $address, [ $comment ] )\nCreate a new \"Mail::Address\" object which represents an address\nwith the elements given. In a message these 3 elements would be\nseen like:\n\nPHRASE <ADDRESS> (COMMENT)\nADDRESS (COMMENT)\n\nexample:\n\nMail::Address->new(\"Perl5 Porters\", \"perl5-porters@africa.nicoh.com\");\n\n$obj->parse($line)\nParse the given line a return a list of extracted \"Mail::Address\"\nobjects.  The line would normally be one taken from a To,Cc or Bcc\nline in a message\n\nexample:\n\nmy @addr = Mail::Address->parse($line);\n\nAccessors\n$obj->address()\nReturn the address part of the object.\n\n$obj->comment()\nReturn the comment part of the object\n\n$obj->format(@addresses)\nReturn a string representing the address in a suitable form to be\nplaced on a \"To\", \"Cc\", or \"Bcc\" line of a message.  This method is\ncalled on the first address to be used; other specified addresses\nwill be appended, separated by commas.\n\n$obj->phrase()\nReturn the phrase part of the object.\n\nSmart accessors\n$obj->host()\nReturn the address excluding the user id and '@'\n\n$obj->name()\nUsing the information contained within the object attempt to\nidentify what the person or groups name is.\n\nNote: This function tries to be smart with the \"phrase\" of the\nemail address, which is probably a very bad idea.  Consider to use\nphrase() itself.\n\n$obj->user()\nReturn the address excluding the '@' and the mail domain\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "This module is part of the MailTools distribution,\nhttp://perl.overmeer.net/mailtools/.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "The MailTools bundle was developed by Graham Barr.  Later, Mark\nOvermeer took over maintenance without commitment to further\ndevelopment.\n\nMail::Cap by Gisle Aas <aas@oslonett.no>.  Mail::Field::AddrList by\nPeter Orbaek <poe@cit.dk>.  Mail::Mailer and Mail::Send by Tim Bunce\n<Tim.Bunce@ig.co.uk>.  For other contributors see ChangeLog.\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 1995-2000 Graham Barr <gbarr@pobox.com> and 2001-2017 Mark\nOvermeer <perl@overmeer.net>.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.  See\nhttp://www.perl.com/perl/misc/Artistic.html\n\nperl v5.28.1                      2019-07-25                Mail::Address(3pm)",
                "subsections": []
            }
        }
    }
}