forked from elastic/logstash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to set a Reply To address for the e-mail output
- Loading branch information
Tim Meighen
committed
Jul 5, 2013
1 parent
4504331
commit 9aebb16
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 => "" | ||
|
@@ -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? | ||
|