1Mail::Transport::Mailx(U3s)er Contributed Perl DocumentatMiaoinl::Transport::Mailx(3)
2
3
4

NAME

6       Mail::Transport::Mailx - transmit messages using external mailx program
7

INHERITANCE

9        Mail::Transport::Mailx
10          is a Mail::Transport::Send
11          is a Mail::Transport
12          is a Mail::Reporter
13

SYNOPSIS

15        my $sender = Mail::Transport::Mailx->new(...);
16        $sender->send($message);
17

DESCRIPTION

19       Implements mail transport using the external programs 'mailx', "Mail",
20       or 'mail'.  When instantiated, the mailer will look for any of these
21       binaries in specific system directories, and the first program found is
22       taken.
23
24       WARNING: There are many security issues with mail and mailx. DO NOT USE
25       these commands to send messages which contains data derived from any
26       external source!!!
27
28       Under Linux, freebsd, and bsdos the "mail", "Mail", and "mailx" names
29       are just links to the same binary.  The implementation is very
30       primitive, pre-MIME standard,  what may cause many headers to be lost.
31       For these platforms (and probably for other platforms as well), you can
32       better not use this transport mechanism.
33

METHODS

35   Constructors
36       Mail::Transport::Mailx->new(OPTIONS)
37            -Option    --Defined in     --Default
38             executable  Mail::Transport  undef
39             hostname    Mail::Transport  'localhost'
40             interval    Mail::Transport  30
41             log         Mail::Reporter   'WARNINGS'
42             password    Mail::Transport  undef
43             port        Mail::Transport  undef
44             proxy       Mail::Transport  undef
45             retry       Mail::Transport  <false>
46             style                        <autodetect>
47             timeout     Mail::Transport  120
48             trace       Mail::Reporter   'WARNINGS'
49             username    Mail::Transport  undef
50             via         Mail::Transport  'mailx'
51
52           executable => FILENAME
53           hostname => HOSTNAME|ARRAY-OF-HOSTNAMES
54           interval => SECONDS
55           log => LEVEL
56           password => STRING
57           port => INTEGER
58           proxy => PATH
59           retry => NUMBER|undef
60           style => 'BSD'|'RFC822'
61             There are two version of the "mail" program.  The newest accepts
62             RFC822 messages, and automagically collect information about
63             where the message is to be send to.  The BSD style mail command
64             predates MIME, and expects lines which start with a '~' (tilde)
65             to specify destinations and such.  This field is autodetect,
66             however on some platforms both versions of "mail" can live (like
67             various Linux distributions).
68
69           timeout => SECONDS
70           trace => LEVEL
71           username => STRING
72           via => CLASS|NAME
73
74   Sending mail
75       $obj->destinations(MESSAGE, [ADDRESS|ARRAY-OF-ADDRESSES])
76           See "Sending mail" in Mail::Transport::Send
77
78       $obj->putContent(MESSAGE, FILEHANDLE, OPTIONS)
79           See "Sending mail" in Mail::Transport::Send
80
81       $obj->send(MESSAGE, OPTIONS)
82           See "Sending mail" in Mail::Transport::Send
83
84       $obj->trySend(MESSAGE, OPTIONS)
85
86   Server connection
87       $obj->findBinary(NAME [, DIRECTORIES])
88           See "Server connection" in Mail::Transport
89
90       $obj->remoteHost
91           See "Server connection" in Mail::Transport
92
93       $obj->retry
94           See "Server connection" in Mail::Transport
95
96   Error handling
97       $obj->AUTOLOAD
98           See "Error handling" in Mail::Reporter
99
100       $obj->addReport(OBJECT)
101           See "Error handling" in Mail::Reporter
102
103       $obj->defaultTrace([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
104           Mail::Transport::Mailx->defaultTrace([LEVEL]|[LOGLEVEL,
105           TRACELEVEL]|[LEVEL, CALLBACK])
106
107           See "Error handling" in Mail::Reporter
108
109       $obj->errors
110           See "Error handling" in Mail::Reporter
111
112       $obj->log([LEVEL [,STRINGS]])
113           Mail::Transport::Mailx->log([LEVEL [,STRINGS]])
114
115           See "Error handling" in Mail::Reporter
116
117       $obj->logPriority(LEVEL)
118           Mail::Transport::Mailx->logPriority(LEVEL)
119
120           See "Error handling" in Mail::Reporter
121
122       $obj->logSettings
123           See "Error handling" in Mail::Reporter
124
125       $obj->notImplemented
126           See "Error handling" in Mail::Reporter
127
128       $obj->report([LEVEL])
129           See "Error handling" in Mail::Reporter
130
131       $obj->reportAll([LEVEL])
132           See "Error handling" in Mail::Reporter
133
134       $obj->trace([LEVEL])
135           See "Error handling" in Mail::Reporter
136
137       $obj->warnings
138           See "Error handling" in Mail::Reporter
139
140   Cleanup
141       $obj->DESTROY
142           See "Cleanup" in Mail::Reporter
143
144       $obj->inGlobalDestruction
145           See "Cleanup" in Mail::Reporter
146

DIAGNOSTICS

148       Warning: Message has no destination
149           It was not possible to figure-out where the message is intended to
150           go to.
151
152       Error: Package $package does not implement $method.
153           Fatal error: the specific package (or one of its superclasses) does
154           not implement this method where it should. This message means that
155           some other related classes do implement this method however the
156           class at hand does not.  Probably you should investigate this and
157           probably inform the author of the package.
158
159       Warning: Resent group does not specify a destination
160           The message which is sent is the result of a bounce (for instance
161           created with Mail::Message::bounce()), and therefore starts with a
162           "Received" header field.  With the "bounce", the new destination(s)
163           of the message are given, which should be included as "Resent-To",
164           "Resent-Cc", and "Resent-Bcc".
165
166           The "To", "Cc", and "Bcc" header information is only used if no
167           "Received" was found.  That seems to be the best explanation of the
168           RFC.
169
170           As alternative, you may also specify the "to" option to some of the
171           senders (for instance Mail::Transport::SMTP::send(to) to overrule
172           any information found in the message itself about the destination.
173
174       Error: Sending via mailx mailer $program failed: $! ($?)
175           Mailx (in some shape: there are many different implementations) did
176           start accepting messages, but did not succeed sending it.
177

SEE ALSO

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

LICENSE

183       Copyrights 2001-2011 by Mark Overmeer. For other contributors see
184       ChangeLog.
185
186       This program is free software; you can redistribute it and/or modify it
187       under the same terms as Perl itself.  See
188       http://www.perl.com/perl/misc/Artistic.html
189
190
191
192perl v5.12.3                      2011-01-26         Mail::Transport::Mailx(3)
Impressum