Skip to content

Commit

Permalink
Feature: Include Mailpit label (if set) in webhook HTTP header (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
axllent committed Dec 6, 2024
1 parent 3e7d4f8 commit 14f1a44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func Send(msg interface{}) {
req.Header.Set("User-Agent", "Mailpit/"+config.Version)
req.Header.Set("Content-Type", "application/json")

if config.Label != "" {
req.Header.Set("Mailpit-Label", config.Label)
}

client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit 14f1a44

Please sign in to comment.