Commit 035771484595e64d2ce0a8bd7c1d486cd7b9936b:
    Show the LDAP host that was used


Branch: refs/heads/master
Author: Sebb <[email protected]>
Committer: Sebb <[email protected]>
Pusher: sebb <[email protected]>

------------------------------------------------------------
www/roster/public_json_common.rb                             | +++++++ --
------------------------------------------------------------
9 changes: 7 additions, 2 deletions.
------------------------------------------------------------


diff --git a/www/roster/public_json_common.rb b/www/roster/public_json_common.rb
index 7f86db5..d61dbf8 100644
--- a/www/roster/public_json_common.rb
+++ b/www/roster/public_json_common.rb
@@ -84,10 +84,15 @@ def write_output(file, results)
           puts "\n#{out}\n"
           require 'mail'
           ASF::Mail.configure
+          ldaphost = ASF::LDAP.host()
           mail = Mail.new do
-            from '[email protected]'
+            from ENV['MAIL_FROM'] || '[email protected]'
             to '[email protected]' # For testing purposes, will be changed to 
[email protected]
-            subject "Difference(s) in #{file}"
+            if ldaphost
+              subject "Difference(s) in #{file} (#{ldaphost})"
+            else
+              subject "Difference(s) in #{file}"
+            end 
             body "\n#{out}\n"
           end
           # deliver mail

Reply via email to