Skip to content

Commit

Permalink
Add ability to set a Reply To address for the e-mail output
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Meighen committed Jul 5, 2013
1 parent 4504331 commit 9aebb16
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/logstash/outputs/email.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class LogStash::Outputs::Email < LogStash::Outputs::Base
# The From setting for email - fully qualified email address for the From:
config :from, :validate => :string, :default => "[email protected]"

# The Reply To setting for email - fully qualified email address for the ReplyTo:
config :replyto, :validate => :string, :default => ""

# cc - send to others
# See *to* field for accepted value description
config :cc, :validate => :string, :default => ""
Expand Down Expand Up @@ -240,6 +243,9 @@ def receive(event)
mail = Mail.new
mail.from = event.sprintf(@from)
mail.to = event.sprintf(@to)
unless @replyto.empty?
mail.reply_to = event.sprintf(@replyto)
end
mail.cc = event.sprintf(@cc)
mail.subject = formatedSubject
if @htmlbody.empty?
Expand Down

0 comments on commit 9aebb16

Please sign in to comment.