The added debug print line always returns string without any @args no matter how I passed them.sub send { my ($class, $message, @args) = @_; my $mailer = $class->_find_sendmail; return failure "Couldn't find 'sendmail' executable in your PATH" ." and \$".__PACKAGE__."::SENDMAIL is not set" unless $mailer; return failure "Found $mailer but cannot execute it" unless -x $mailer; local $SIG{'CHLD'} = 'DEFAULT'; my $pipe = gensym; ### print "| $mailer -t -oi @args"; open $pipe, "| $mailer -t -oi @args" or return failure "Error executing $mailer: $!"; print $pipe $message->as_string or return failure "Error printing via pipe to $mailer: $!"; close $pipe or return failure "error when closing pipe to $mailer: $!"; return success; }
In reply to Re^2: Email::Send::Sendmail and argument passing
by Anonymous Monk
in thread Email::Send::Sendmail and argument passing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |