| 1 | # Copyrights 1995-2024 by [Mark Overmeer <markov@cpan.org>]. | ||
| 2 | # For other contributors see ChangeLog. | ||
| 3 | # See the manual pages for details on the licensing terms. | ||
| 4 | # Pod stripped from pm file by OODoc 2.03. | ||
| 5 | # This code is part of the bundle MailTools. Meta-POD processed with | ||
| 6 | # OODoc into POD and HTML manual-pages. See README.md for Copyright. | ||
| 7 | # Licensed under the same terms as Perl itself. | ||
| 8 | |||
| 9 | package Mail::Mailer::qmail;{ | ||
| 10 | our $VERSION = '2.22'; | ||
| 11 | } | ||
| 12 | |||
| 13 | use base 'Mail::Mailer::rfc822'; | ||
| 14 | |||
| 15 | use strict; | ||
| 16 | |||
| 17 | sub exec($$$$) | ||
| 18 | { my($self, $exe, $args, $to, $sender) = @_; | ||
| 19 | my $address = defined $sender && $sender =~ m/\<(.*?)\>/ ? $1 : $sender; | ||
| 20 | |||
| 21 | exec($exe, (defined $address ? "-f$address" : ())); | ||
| 22 | die "ERROR: cannot run $exe: $!"; | ||
| 23 | } | ||
| 24 | |||
| 25 | 1; |