The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Server::Mail::ESMTP::HELP - Simple implementation of HELP for Net::Server::Mail::ESMTP

VERSION

Version 0.01

SYNOPSIS

Simple implementation of HELP for Net::Server::Mail::ESMTP.

    use Net::Server::Mail::ESMTP;
    my $server = new IO::Socket::INET Listen => 1, LocalPort => 25;

    my $conn;
    while($conn = $server->accept)
    {
      my $esmtp = new Net::Server::Mail::ESMTP socket => $conn;

      # activate HELP extension
      $esmtp->register('Net::Server::Mail::ESMTP::HELP');

      # adding (optional) HELP handler
      $esmtp->set_callback(HELP => \&show_help);
      $esmtp->process;
    }

    # if you don't set a custom HELP handler, the default one will be used which just lists all known verbs
    sub show_help {
        my ($session, $command) = @_;
    
        $session->reply(214, ($command ? "2.0.0 Heck yeah, '$command' rules!\n":'') . "2.0.0 Available Commands: " . join(', ', keys %{$session->{verb}}) . "\nEnd of HELP info");
    
        return 1;
    }

EXPORT

A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module.

FUNCTIONS

verb

keyword

reply

help

AUTHOR

Dan Moore, <dan at moore.cx>

BUGS

Please report any bugs or feature requests to bug-net-server-mail-esmtp-help at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Server-Mail-ESMTP-HELP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Net::Server::Mail::ESMTP::HELP

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2011 Dan Moore.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.