{
    "content": [
        {
            "type": "text",
            "text": "# Mail::Mailer (perldoc)\n\n## NAME\n\nMail::Mailer - send simple emails\n\n## SYNOPSIS\n\nuse Mail::Mailer;\nuse Mail::Mailer qw(mail);    # specifies default mailer\n$mailer = Mail::Mailer->new;\n$mailer = Mail::Mailer->new($type, @args);\n$mailer->open(\\%headers);\nprint $mailer $body;\n$mailer->close\nor die \"couldn't send whole message: $!\\n\";\n\n## DESCRIPTION\n\nSends mail using any of the built-in methods. As TYPE argument to new(), you can specify any of\n\n## Sections\n\n- **NAME**\n- **INHERITANCE**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS** (1 subsections)\n- **DETAILS**\n- **SEE ALSO**\n- **AUTHORS**\n- **LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Mail::Mailer",
        "section": "",
        "mode": "perldoc",
        "summary": "Mail::Mailer - send simple emails",
        "synopsis": "use Mail::Mailer;\nuse Mail::Mailer qw(mail);    # specifies default mailer\n$mailer = Mail::Mailer->new;\n$mailer = Mail::Mailer->new($type, @args);\n$mailer->open(\\%headers);\nprint $mailer $body;\n$mailer->close\nor die \"couldn't send whole message: $!\\n\";",
        "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": 11,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 40,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Constructors",
                        "lines": 10
                    }
                ]
            },
            {
                "name": "DETAILS",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Mail::Mailer - send simple emails\n",
                "subsections": []
            },
            "INHERITANCE": {
                "content": "Mail::Mailer\nis an IO::Handle\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Mail::Mailer;\nuse Mail::Mailer qw(mail);    # specifies default mailer\n\n$mailer = Mail::Mailer->new;\n$mailer = Mail::Mailer->new($type, @args);\n\n$mailer->open(\\%headers);\nprint $mailer $body;\n$mailer->close\nor die \"couldn't send whole message: $!\\n\";\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Sends mail using any of the built-in methods. As TYPE argument to new(), you can specify any of\n\n\"sendmail\"\nUse the \"sendmail\" program to deliver the mail.\n\n\"smtp\"\nUse the \"smtp\" protocol via Net::SMTP to deliver the mail. The server to use can be\nspecified in @args with\n\n$mailer = Mail::Mailer->new('smtp', Server => $server);\n\nThe smtp mailer does not handle \"Cc\" and \"Bcc\" lines, neither their \"Resent-*\" fellows. The\n\"Debug\" options enables debugging output from \"Net::SMTP\".\n\n[added 2.21] You may also use the \"StartTLS => 1\" options to upgrade the connection with\nSTARTTLS. You need \"libnet\" version 1.28 (2014) for this to work.\n\nYou may also use the \"Auth => [ $user, $password ]\" option for SASL authentication. To make\nthis work, you have to install the Authen::SASL distribution yourself: it is not\nautomatically installed.\n\n\"smtps\"\nThis option is deprecated when you have \"libnet\" 1.28 (2014) and above.\n\nUse the smtp over ssl protocol via Net::SMTP::SSL to deliver the mail. Usage is identical to\n\"smtp\". You have to install Authen::SASL as well.\n\n$mailer = Mail::Mailer->new('smtps', Server => $server);\n\n\"qmail\"\nUse qmail's qmail-inject program to deliver the mail.\n\n\"testfile\"\nUsed for debugging, this displays the data to the file named in\n$Mail::Mailer::testfile::config{outfile} which defaults to a file named \"mailer.testfile\".\nNo mail is ever sent.\n\n\"Mail::Mailer\" will search for executables in the above order. The default mailer will be the\nfirst one found.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Constructors",
                        "content": "Mail::Mailer->new($type, %options)\nThe $type is one of the back-end sender implementations, as described in the DESCRIPTION\nchapter of this manual page. The %options are passed to that back-end.\n\n$obj->open(HASH)\nThe HASH consists of key and value pairs, the key being the name of the header field (eg,\n\"To\"), and the value being the corresponding contents of the header field. The value can\neither be a scalar (eg, \"gnat@frii.com\") or a reference to an array of scalars (\"eg,\n['gnat@frii.com', 'Tim.Bunce@ig.co.uk']\").\n"
                    }
                ]
            },
            "DETAILS": {
                "content": "ENVIRONMENT VARIABLES\nPERLMAILERS\nAugments/override the build in choice for binary used to send out our mail messages.\n\nFormat:\n\n\"type1:mailbinary1;mailbinary2;...:type2:mailbinaryX;...:...\"\n\nExample: assume you want you use private sendmail binary instead of mailx, one could set\n\"PERLMAILERS\" to:\n\n\"mail:/does/not/exists:sendmail:$HOME/test/bin/sendmail\"\n\nOn systems which may include \":\" in file names, use \"|\" as separator between type-groups.\n\n\"mail:c:/does/not/exists|sendmail:$HOME/test/bin/sendmail\"\n\nBUGS\nMail::Mailer does not help with folding, and does not protect against various web-script hacker\nattacks, for instance where a new-line is inserted in the content of the field.\n",
                "subsections": []
            },
            "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": []
            }
        }
    }
}