1Mail::Transport(3)    User Contributed Perl Documentation   Mail::Transport(3)
2
3
4

NAME

6       Mail::Transport - base class for message exchange
7

INHERITANCE

9        Mail::Transport
10          is a Mail::Reporter
11
12        Mail::Transport is extended by
13          Mail::Transport::Receive
14          Mail::Transport::Send
15

SYNOPSIS

17        my $message = Mail::Message->new(...);
18
19        # Some extensions implement sending:
20        $message->send;
21        $message->send(via => 'sendmail');
22
23        my $sender = Mail::Transport::SMTP->new(...);
24        $sender->send($message);
25
26        # Some extensions implement receiving:
27        my $receiver = Mail::Transport::POP3->new(...);
28        $message = $receiver->receive;
29

DESCRIPTION

31       Objects which extend "Mail::Transport" implement sending and/or
32       receiving of messages, using various protocols.
33
34       Mail::Transport::Send extends this class, and offers general
35       functionality for send protocols, like SMTP.  Mail::Transport::Receive
36       also extends this class, and offers receive method.  Some transport
37       protocols will implement both sending and receiving.
38

METHODS

40   Constructors
41       Mail::Transport->new(OPTIONS)
42            -Option    --Defined in     --Default
43             executable                   undef
44             hostname                     'localhost'
45             interval                     30
46             log         Mail::Reporter   'WARNINGS'
47             password                     undef
48             port                         undef
49             proxy                        undef
50             retry                        <false>
51             timeout                      120
52             trace       Mail::Reporter   'WARNINGS'
53             username                     undef
54             via                          'sendmail'
55
56           executable => FILENAME
57             If you specify an executable, the module does not need to search
58             the system directories to figure-out where the client lives.
59             Using this decreases the flexible usage of your program: moving
60             your program to other systems may involve changing the path to
61             the executable, which otherwise would work auto-detect and
62             unmodified.
63
64           hostname => HOSTNAME|ARRAY-OF-HOSTNAMES
65             The host on which the server runs.  Some protocols accept an
66             array of alternatives for this option.
67
68           interval => SECONDS
69             The time between tries to contact the remote server for sending
70             or receiving a message in SECONDS.  This number must be larger
71             than 0.
72
73           log => LEVEL
74           password => STRING
75             Some protocols require a password to be given, usually in
76             combination with a password.
77
78           port => INTEGER
79             The port number behind which the service is hiding on the remote
80             server.
81
82           proxy => PATH
83             The name of the proxy software (the protocol handler).  This must
84             be the name (preferable the absolute path) of your mail delivery
85             software.
86
87           retry => NUMBER|undef
88             The number of retries before the sending will fail.  If "undef",
89             the number of retries is unlimited.
90
91           timeout => SECONDS
92             SECONDS till time-out while establishing the connection to a
93             remote server.
94
95           trace => LEVEL
96           username => STRING
97             Some protocols require a user to login.
98
99           via => CLASS|NAME
100             Which CLASS (extending "Mail::Transport") will transport the
101             data.  Some predefined NAMEs avoid long class names: "mail" and
102             "mailx" are handled by the Mail::Transport::Mailx module,
103             "sendmail" and "postfix" belong to Mail::Transport::Sendmail, and
104             "smtp" is implemented in Mail::Transport::SMTP.  The "pop" or
105             "pop3" protocol implementation can be found in
106             Mail::Transport::POP3.
107
108   Server connection
109       $obj->findBinary(NAME [, DIRECTORIES])
110           Look for a binary with the specified NAME in the directories which
111           are defined to be safe.  The list of standard directories is
112           followed by the optional DIRECTORIES.  The full pathname is
113           returned.
114
115           You may specify new(proxy), which specifies the absolute name of
116           the binary to be used.
117
118       $obj->remoteHost
119           Returns the hostname, port number, username and password to be used
120           to establish the connection to the server for sending or receiving
121           mail.
122
123       $obj->retry
124           Returns the retry interval, retry count, and timeout for the
125           connection.
126
127   Error handling
128       $obj->AUTOLOAD
129           See "Error handling" in Mail::Reporter
130
131       $obj->addReport(OBJECT)
132           See "Error handling" in Mail::Reporter
133
134       $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
135           Mail::Transport->defaultTrace([LEVEL]|[LOGLEVEL,
136           TRACELEVEL]|[LEVEL, CALLBACK])
137
138           See "Error handling" in Mail::Reporter
139
140       $obj->errors
141           See "Error handling" in Mail::Reporter
142
143       $obj->log([LEVEL [,STRINGS]])
144           Mail::Transport->log([LEVEL [,STRINGS]])
145
146           See "Error handling" in Mail::Reporter
147
148       $obj->logPriority(LEVEL)
149           Mail::Transport->logPriority(LEVEL)
150
151           See "Error handling" in Mail::Reporter
152
153       $obj->logSettings
154           See "Error handling" in Mail::Reporter
155
156       $obj->notImplemented
157           See "Error handling" in Mail::Reporter
158
159       $obj->report([LEVEL])
160           See "Error handling" in Mail::Reporter
161
162       $obj->reportAll([LEVEL])
163           See "Error handling" in Mail::Reporter
164
165       $obj->trace([LEVEL])
166           See "Error handling" in Mail::Reporter
167
168       $obj->warnings
169           See "Error handling" in Mail::Reporter
170
171   Cleanup
172       $obj->DESTROY
173           See "Cleanup" in Mail::Reporter
174
175       $obj->inGlobalDestruction
176           See "Cleanup" in Mail::Reporter
177

DIAGNOSTICS

179       Warning: Avoid program abuse: specify an absolute path for $exec.
180           Specifying explicit locations for executables of email transfer
181           agents should only be done with absolute file names, to avoid
182           various pontential security problems.
183
184       Warning: Executable $exec does not exist.
185           The explicitly indicated mail transfer agent does not exists. The
186           normal settings are used to find the correct location.
187
188       Error: Package $package does not implement $method.
189           Fatal error: the specific package (or one of its superclasses) does
190           not implement this method where it should. This message means that
191           some other related classes do implement this method however the
192           class at hand does not.  Probably you should investigate this and
193           probably inform the author of the package.
194

SEE ALSO

196       This module is part of Mail-Box distribution version 2.097, built on
197       January 26, 2011. Website: http://perl.overmeer.net/mailbox/
198

LICENSE

200       Copyrights 2001-2011 by Mark Overmeer. For other contributors see
201       ChangeLog.
202
203       This program is free software; you can redistribute it and/or modify it
204       under the same terms as Perl itself.  See
205       http://www.perl.com/perl/misc/Artistic.html
206
207
208
209perl v5.12.3                      2011-01-26                Mail::Transport(3)
Impressum