Subject: | [PATCH] Email::Send::Sendmail |
Hi.
Here is patch for E::S::Sendmail with two changes:
* Better error message when $SENDMAIL is not set and sendmail program is
not in PATH
* Method returns failure when a custom CHLD signal handler is installed
or this signal is ignored. In this case method returns "error when
closing pipe to /usr/bin/sendmail: No child processes".
--
Best regards, Ruslan.
Subject: | email_send_sendmail.patch |
diff -ru Email-Send-2.183/lib/Email/Send/Sendmail.pm Email-Send-2.183-my/lib/Email/Send/Sendmail.pm
--- Email-Send-2.183/lib/Email/Send/Sendmail.pm 2006-08-14 20:34:50.000000000 +0400
+++ Email-Send-2.183-my/lib/Email/Send/Sendmail.pm 2006-12-28 19:20:44.000000000 +0300
@@ -36,9 +36,13 @@
my ($class, $message, @args) = @_;
my $mailer = $class->_find_sendmail;
+ return failure "Couldn't find sendmail executable in your PATH"
+ unless $mailer;
return failure "Found $mailer but cannot execute it"
unless -x $mailer;
-
+
+ local $SIG{'CHLD'} = 'DEFAULT';
+
my $pipe = gensym;
open $pipe, "| $mailer -t -oi @args"