Subject: | Email::Send::Qmail doesn't work as advertised |
The documentation for Email::Send::Qmail states:
... It does not try hard to find the executable. It just calls
qmail-inject and expects it to be in your path. If that's not the
case, or you want to explicitly define the location of your
executable, alter the $Email::Send::Qmail::QMAIL package variable.
$Email::Send::Qmail::QMAIL = '/usr/sbin/qmail-inject';
However this does not work due to the way the class is currently
coded.
Below is a patch which first checks if the user has set the $QMAIL
class variable and uses that as the executable before checking
locations in the user's PATH for the executable.
cheers Simon
-------------------------
Diff of Email::Send::Qmail against current release
-------------------------
9d8
< $QMAIL ||= q[qmail-inject];
24,27c23,33
< for my $dir (File::Spec->path) {
< if ( -x "$dir/$QMAIL" ) {
< $sendmail = "$dir/$QMAIL";
< last;
---
Show quoted text
>
> if ( $QMAIL && -x $QMAIL ) {
> $sendmail = $QMAIL;
> }
> else {
> for my $dir (File::Spec->path) {
> my $qmail_path = "$dir/qmail-inject";
> if ( -x $qmail_path ) {
> $sendmail = $qmail_path;
> last;
> }