summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-08-13 23:56:19 +0200
committerlpsolit%gmail.com <>2005-08-13 23:56:19 +0200
commit0b42b63e6eb6e2c91a048ff073574048940215f4 (patch)
treed0c4b4c559420d6ed01947080ebb268f03b8620f /Bugzilla
parentef9cdafcfa56f3f002fc15416641861b9e9e794d (diff)
downloadbugzilla-0b42b63e6eb6e2c91a048ff073574048940215f4.tar.gz
bugzilla-0b42b63e6eb6e2c91a048ff073574048940215f4.tar.xz
Bug 302418: re-enable sendmail support for Windows - Patch by byron jones (glob) <bugzilla@glob.com.au> r=wurblzap a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/BugMail.pm8
-rw-r--r--Bugzilla/Constants.pm5
2 files changed, 13 insertions, 0 deletions
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;