{
    "mode": "perldoc",
    "parameter": "Log::Dispatch::Email",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Log%3A%3ADispatch%3A%3AEmail/json",
    "generated": "2026-06-09T17:11:08Z",
    "synopsis": "package Log::Dispatch::Email::MySender;\nuse Log::Dispatch::Email;\nuse base qw( Log::Dispatch::Email );\nsub sendemail {\nmy $self = shift;\nmy %p    = @;\n# Send email somehow. Message is in $p{message}\n}",
    "sections": {
        "NAME": {
            "content": "Log::Dispatch::Email - Base class for objects that send log messages via email\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.70\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "package Log::Dispatch::Email::MySender;\n\nuse Log::Dispatch::Email;\nuse base qw( Log::Dispatch::Email );\n\nsub sendemail {\nmy $self = shift;\nmy %p    = @;\n\n# Send email somehow. Message is in $p{message}\n}\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module should be used as a base class to implement Log::Dispatch::* objects that send their\nlog messages via email. Implementing a subclass simply requires the code shown in the \"SYNOPSIS\"\nwith a real implementation of the \"sendemail()\" method.\n",
            "subsections": []
        },
        "CONSTRUCTOR": {
            "content": "The constructor takes the following parameters in addition to the standard parameters documented\nin Log::Dispatch::Output:\n\n*   subject ($)\n\nThe subject of the email messages which are sent. Defaults to \"$0: log email\"\n\n*   to ($ or \\@)\n\nEither a string or a list reference of strings containing email addresses. Required.\n\n*   from ($)\n\nA string containing an email address. This is optional and may not work with all mail\nsending methods.\n\n*   buffered (0 or 1)\n\nThis determines whether the object sends one email per message it is given or whether it\nstores them up and sends them all at once. The default is to buffer messages.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "This class provides the following methods:\n\n$email->sendemail(%p)\nThis is the method that must be subclassed. For now the only parameter in the hash is 'message'.\n\n$email->flush\nIf the object is buffered, then this method will call the \"sendemail()\" method to send the\ncontents of the buffer and then clear the buffer.\n\n$email->DESTROY\nOn destruction, the object will call \"flush()\" to send any pending email.\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs may be submitted at <https://github.com/houseabsolute/Log-Dispatch/issues>.\n\nI am also usually active on IRC as 'autarch' on \"irc://irc.perl.org\".\n",
            "subsections": []
        },
        "SOURCE": {
            "content": "The source code repository for Log-Dispatch can be found at\n<https://github.com/houseabsolute/Log-Dispatch>.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Dave Rolsky <autarch@urth.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is Copyright (c) 2020 by Dave Rolsky.\n\nThis is free software, licensed under:\n\nThe Artistic License 2.0 (GPL Compatible)\n\nThe full text of the license can be found in the LICENSE file included with this distribution.\n",
            "subsections": []
        }
    },
    "summary": "Log::Dispatch::Email - Base class for objects that send log messages via email",
    "flags": [],
    "examples": [],
    "see_also": []
}