my $sender = Mail::Transport::Mailx->new(...); $sender->send($message);
See SYNOPSIS in Mail::Transport::Send
Implements mail transport using the external programs
'mail'. When instantiated, the mailer will look for
any of these binaries in specific system directories, and the first
program found is taken.
WARNING: There are many security issues with mail and mailx. DO NOT USE these commands to send messages which contains data derived from any external source!!!
Under Linux, freebsd, and bsdos the
mailx names are
just links to the same binary. The implementation is very primitive, pre-MIME
standard, what may cause many headers to be lost. For these platforms (and
probably for other platforms as well), you can better not use this transport
See DESCRIPTION in Mail::Transport::Send