lib/ring/sqa/alarm/email.rb in ring-sqa-0.3.1 vs lib/ring/sqa/alarm/email.rb in ring-sqa-0.4.1

- old
+ new

@@ -3,17 +3,19 @@ module Ring class SQA class Alarm class Email - SERVER = 'localhost' + SERVER = 'localhost' + LIST_ID = 'ring-sqa <sqa.ring.nlnog.net>' def send opts short, long = opts[:short], opts[:long] @from = CFG.email.from @to = [CFG.email.to].flatten prefix = CFG.email.prefix? ? CFG.email.prefix : '' + @list_id = CFG.email.list_id? ? CFG.email.list_id : LIST_ID @subject = prefix + short @reply_to = CFG.email.reply_to? ? CFG.email.reply_to : @from @body = long send_email compose_email rescue => error @@ -26,10 +28,10 @@ mail = [] mail << 'From: ' + @from mail << 'To: ' + @to.join(', ') mail << 'Reply-To: ' + @reply_to mail << 'Subject: ' + @subject - mail << 'List-Id: ' + 'ring-sqa <sqa.ring.nlnog.net>' + mail << 'List-Id: ' + @list_id mail << 'X-Mailer: ' + 'ring-sqa' mail << '' mail = mail.join("\n") mail+@body end