1
0
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:
Ralph Slooten
2024-12-06 17:21:52 +13:00
parent 3e7d4f8175
commit 14f1a44c7a

View File

@ -54,6 +54,10 @@ func Send(msg interface{}) {
req.Header.Set("User-Agent", "Mailpit/"+config.Version) req.Header.Set("User-Agent", "Mailpit/"+config.Version)
req.Header.Set("Content-Type", "application/json") req.Header.Set("Content-Type", "application/json")
if config.Label != "" {
req.Header.Set("Mailpit-Label", config.Label)
}
client := &http.Client{} client := &http.Client{}
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {