summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
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;