NAME

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

CLASS INHERITANCE

Mail::Transport::Mailx is a Mail::Transport::Send is a Mail::Transport is a Mail::Reporter

SYNOPSIS

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

DESCRIPTION

Implements mail transport using the external programs 'mailx', Mail, or 'mail'. When instantiated, the mailer will look for any of these binaries in specific system directories, and the first program found is taken.

Under Linux, freebsd, and bsdos the mail, Mail, and mailx names are just links. They are very primitive, what will cause many headers to be lost. For these platforms, you can better not use this transport mechanism.

METHODS

Initiation

new OPTIONS
OPTION               DEFAULT
hostname             'localhost'
interval             30
log                  'WARNINGS'
password             undef
port                 undef
proxy                undef
retry                <false>
style                <autodetect>
timeout              120
trace                'WARNINGS'
username             undef
via                  'mailx'
hostname => HOSTNAME|ARRAY-OF-HOSTNAMES

See Mail::Transport::new(hostname)

interval => SECONDS

See Mail::Transport::new(interval)

log => LEVEL

See Mail::Reporter::new(log)

password => STRING

See Mail::Transport::new(password)

port => INTEGER

See Mail::Transport::new(port)

proxy => PATH

See Mail::Transport::new(proxy)

retry => NUMBER|undef

See Mail::Transport::new(retry)

style => 'BSD'|'RFC822'

There are two version of the mail program. The newest accepts RFC822 messages, and automagically collect information about where the message is to be send to. The BSD style mail command predates MIME, and expects lines which start with a '~' (tilde) to specify destinations and such. This field is autodetect, however on some platforms both versions of mail can live (like various Linux distributions).

timeout => SECONDS

See Mail::Transport::new(timeout)

trace => LEVEL

See Mail::Reporter::new(trace)

username => STRING

See Mail::Transport::new(username)

via => CLASS|NAME

See Mail::Transport::new(via)

Server Connection

findBinary NAME [, DIRECTORIES]

See Mail::Transport::findBinary()

remoteHost

See Mail::Transport::remoteHost()

retry

See Mail::Transport::retry()

Sending Mail

putContent MESSAGE, FILEHANDLE, OPTIONS

See Mail::Transport::Send::putContent()

send MESSAGE, OPTIONS

See Mail::Transport::Send::send()

trySend MESSAGE, OPTIONS

See Mail::Transport::Send::trySend()

Logging and Tracing

defaultTrace [LEVEL, [LEVEL]

See Mail::Reporter::defaultTrace()

errors

See Mail::Reporter::errors()

log [LEVEL [,STRINGS]]

See Mail::Reporter::log()

report [LEVEL]

See Mail::Reporter::report()

reportAll [LEVEL]

See Mail::Reporter::reportAll()

trace [LEVEL]

See Mail::Reporter::trace()

warnings

See Mail::Reporter::warnings()

Other Methods

AUTOLOAD

See Mail::Reporter::AUTOLOAD()

DESTROY

See Mail::Reporter::DESTROY()

inGlobalDestruction

See Mail::Reporter::inGlobalDestruction()

logPriority LEVEL

See Mail::Reporter::logPriority()

logSettings

See Mail::Reporter::logSettings()

notImplemented

See Mail::Reporter::notImplemented()

SEE ALSO

A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.

AUTHOR

Mark Overmeer (mark@overmeer.net) with the help of many.

VERSION

This code is beta, version 2.023.

Copyright (c) 2001-2002 Mark Overmeer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.