# Mail::Transport::Receive - receive messages - perldoc - [phpMan]

## NAME
    [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown) - receive messages

## INHERITANCE
     [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown)
       is a [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown)
       is a [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

     [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown) is extended by
       [Mail::Transport::IMAP4](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AIMAP4/markdown)
       [Mail::Transport::POP3](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3APOP3/markdown)

## SYNOPSIS
     my $receiver = [Mail::Transport::POP3](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3APOP3/markdown)->new(...);
     my $message = $receiver->receive($id);

## DESCRIPTION
    Each object which extends [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown) implement a protocol which can get messages
    into your application. The internals of each implementation can differ quite a lot, so have a
    look at each separate manual page as well.

    Current message receivers:

    *   [Mail::Transport::POP3](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3APOP3/markdown)

        Implements the POP3 protocol. See also [Mail::Box::POP3](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ABox%3A%3APOP3/markdown).

    Extends "DESCRIPTION" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown).

## METHODS
    Extends "METHODS" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown).

### Constructors
    Extends "Constructors" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown).

    [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown)->new(%options)
        Inherited, see "METHODS" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown)

### Receiving mail
    $obj->receive( [$unique_message_id] )
        Receive one message from the remote server. Some receivers will provide the next message
        automatically, other are random access and use the specified ID.

### Server connection
    Extends "Server connection" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown).

    $obj->findBinary( $name, [@directories] )
        Inherited, see "Server connection" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown)

    $obj->remoteHost()
        Inherited, see "Server connection" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown)

    $obj->retry()
        Inherited, see "Server connection" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown)

### Error handling
    Extends "Error handling" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown).

    $obj->AUTOLOAD()
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->addReport($object)
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
    [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown)->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->errors()
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->log( [$level, [$strings]] )
    [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown)->log( [$level, [$strings]] )
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->logPriority($level)
    [Mail::Transport::Receive](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport%3A%3AReceive/markdown)->logPriority($level)
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->logSettings()
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->notImplemented()
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->report( [$level] )
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->reportAll( [$level] )
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->trace( [$level] )
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

    $obj->warnings()
        Inherited, see "Error handling" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

### Cleanup
    Extends "Cleanup" in [Mail::Transport](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3ATransport/markdown).

    $obj->DESTROY()
        Inherited, see "Cleanup" in [Mail::Reporter](https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AReporter/markdown)

## DIAGNOSTICS
    Warning: Avoid program abuse: specify an absolute path for $exec.
        Specifying explicit locations for executables of email transfer agents should only be done
        with absolute file names, to avoid various pontential security problems.

    Warning: Executable $exec does not exist.
        The explicitly indicated mail transfer agent does not exists. The normal settings are used
        to find the correct location.

    Error: Package $package does not implement $method.
        Fatal error: the specific package (or one of its superclasses) does not implement this
        method where it should. This message means that some other related classes do implement this
        method however the class at hand does not. Probably you should investigate this and probably
        inform the author of the package.

## SEE ALSO
    This module is part of Mail-Transport distribution version 3.005, built on July 22, 2020.
    Website: <http://perl.overmeer.net/CPAN/>

## LICENSE
    Copyrights 2001-2020 by [Mark Overmeer]. For other contributors see ChangeLog.

    This program is free software; you can redistribute it and/or modify it under the same terms as
    Perl itself. See <http://dev.perl.org/licenses/>

