mirror of
https://github.com/axllent/mailpit.git
synced 2025-07-03 00:46:58 +02:00
Feature: Include Mailpit label (if set) in webhook HTTP header (#400)
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user