{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Util (perldoc)\n\n## NAME\n\nMail::Util - mail utility functions\n\n## SYNOPSIS\n\nuse Mail::Util qw( ... );\n\n## DESCRIPTION\n\nThis package provides several mail related utility functions. Any function required must by\nexplicitly listed on the use line to be exported into the calling package.\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **FUNCTIONS** (3 subsections)\n- **SEE ALSO**\n- **AUTHORS**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Util",
        "section": "",
        "mode": "perldoc",
        "summary": "Mail::Util - mail utility functions",
        "synopsis": "use Mail::Util qw( ... );",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "INHERITANCE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "mailaddress",
                        "lines": 22
                    },
                    {
                        "name": "maildomain",
                        "lines": 25
                    },
                    {
                        "name": "read_mbox",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Mail::Util - mail utility functions\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Util\nis a Exporter\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Mail::Util qw( ... );\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This package provides several mail related utility functions. Any function required must by\nexplicitly listed on the use line to be exported into the calling package.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "mailaddress",
                        "content": "Return a guess at the current users mail address. The user can force the return value by\nsetting the MAILADDRESS environment variable. [2.10] You may set the $address via the\nparameter.\n\nWARNING: When not supplied via the environment variable, <mailaddress> looks at various\nconfiguration files and other environmental data. Although this seems to be smart behavior,\nthis is not predictable enough (IMHO) to be used. Please set the MAILADDRESS explicitly, and\ndo not trust on the \"automatic detection\", even when that produces a correct address (on the\nmoment)\n\nexample:\n\n# in your main script\n$ENV{MAILADDRESS} = 'me@example.com';\n\n# everywhere else\nuse Mail::Util 'mailaddress';\nprint mailaddress;\n\n# since v2.10\nmailaddress \"me@example.com\";\n"
                    },
                    {
                        "name": "maildomain",
                        "content": "Attempt to determine the current user mail domain string via the following methods\n\n*   Look for the MAILDOMAIN environment variable, which can be set from outside the program.\nThis is by far the best way to configure the domain.\n\n*   Look for a sendmail.cf file and extract DH parameter\n\n*   Look for a smail config file and usr the first host defined in hostname(s)\n\n*   Try an SMTP connect (if Net::SMTP exists) first to mailhost then localhost\n\n*   Use value from Net::Domain::domainname (if Net::Domain exists)\n\nWARNING: On modern machines, there is only one good way to provide information to this\nmethod: the first; always explicitly configure the MAILDOMAIN.\n\nexample:\n\n# in your main script\n$ENV{MAILDOMAIN} = 'example.com';\n\n# everywhere else\nuse Mail::Util 'maildomain';\nprint maildomain;\n"
                    },
                    {
                        "name": "read_mbox",
                        "content": "Read $file, a binmail mailbox file, and return a list of references. Each reference is a\nreference to an array containing one message.\n\nWARNING: This method does not quote lines which accidentally also start with the message\nseparator \"From\", so this implementation can be considered broken. See Mail::Box::Mbox\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "This module is part of the MailTools distribution, http://perl.overmeer.net/mailtools/.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "The MailTools bundle was developed by Graham Barr. Later, Mark Overmeer took over maintenance\nwithout commitment to further development.\n\nMail::Cap by Gisle Aas <aas@oslonett.no>. Mail::Field::AddrList by Peter Orbaek <poe@cit.dk>.\nMail::Mailer and Mail::Send by Tim Bunce <Tim.Bunce@ig.co.uk>. For other contributors see\nChangeLog.\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyrights 1995-2000 Graham Barr <gbarr@pobox.com> and 2001-2017 Mark Overmeer\n<perl@overmeer.net>.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://www.perl.com/perl/misc/Artistic.html\n",
                "subsections": []
            }
        }
    }
}