This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example : add an example "send email with event data received on http"
core : use webhook.listen flags to set codeWebHookServer host and port
- Loading branch information
Showing
3 changed files
with
58 additions
and
7 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
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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# send a email when a http request comes to http://127.0.0.1:19090/sendEmailOnHTTP/welcome/send | ||
|
||
input{ | ||
# print link to stdout on pipeline start | ||
stdout{ | ||
codec => line { | ||
format => "go to http://127.0.0.1:19090/sendEmailOnHTTP/welcome/send?name=Jon" | ||
delimiter => " : " | ||
} | ||
} | ||
|
||
httpserver "welcome"{ | ||
codec=>plain | ||
uri="send" | ||
} | ||
} | ||
|
||
filter{ | ||
template { | ||
target => "output" | ||
location => "<h1>Hello {{index .request.querystring.name 0}} !</h1>" | ||
} | ||
|
||
# print event to stdout (debug) | ||
stdout{ | ||
codec=> rubydebug | ||
} | ||
} | ||
|
||
|
||
output{ | ||
email{ | ||
address => "bananapi.local" | ||
port => 1025 | ||
|
||
from => "bitfan@nowhere.com" | ||
to => "me@host.com, you@host.com" | ||
cc => "mecc@host.com, youcc@host.com" | ||
|
||
subject => 'Bitfan on {{TS "dd/MM/YYYY" .}}' | ||
htmlbody => "{{.output | SafeHTML}}" | ||
} | ||
} |