From 0b42b63e6eb6e2c91a048ff073574048940215f4 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 13 Aug 2005 21:56:19 +0000 Subject: Bug 302418: re-enable sendmail support for Windows - Patch by byron jones (glob) r=wurblzap a=justdave --- Bugzilla/BugMail.pm | 8 ++++++++ Bugzilla/Constants.pm | 5 +++++ 2 files changed, 13 insertions(+) (limited to 'Bugzilla') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index e51f0c83b..260cb0554 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -615,6 +615,14 @@ sub MessageToMTA { my ($msg) = (@_); return if (Param('mail_delivery_method') eq "none"); + if (Param("mail_delivery_method") eq "sendmail" && $^O =~ /MSWin32/i) { + open(SENDMAIL, '|' . SENDMAIL_EXE . ' -t -i') || + die "Failed to execute " . SENDMAIL_EXE . ": $!\n"; + print SENDMAIL $msg; + close SENDMAIL; + return; + } + my @args; if (Param("mail_delivery_method") eq "sendmail" && !Param("sendmailnow")) { push @args, "-ODeliveryMode=deferred"; diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 95b8af98c..2ebb7f10c 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -89,6 +89,8 @@ use base qw(Exporter); FULLTEXT_BUGLIST_LIMIT ADMIN_GROUP_NAME + + SENDMAIL_EXE ); @Bugzilla::Constants::EXPORT_OK = qw(contenttypes); @@ -238,4 +240,7 @@ use constant FULLTEXT_BUGLIST_LIMIT => 200; # Default administration group name. use constant ADMIN_GROUP_NAME => 'admin'; +# Path to sendmail.exe (Windows only) +use constant SENDMAIL_EXE => '/usr/lib/sendmail.exe'; + 1; -- cgit v1.2.3-24-g4f1b