fix(GODT-2380): Only set external ID in header if non-empty

This commit is contained in:
James Houlahan
2023-02-20 11:16:50 +01:00
parent 6a9f6a173a
commit cf8284a489

View File

@ -479,8 +479,10 @@ func getMessageHeader(msg proton.Message, opts JobOptions) message.Header {
// Set our external ID if requested.
// This was useful during debugging of applemail recovered messages; doesn't help with any behaviour.
if opts.AddExternalID {
if msg.ExternalID != "" {
hdr.Set("X-Pm-External-Id", "<"+msg.ExternalID+">")
}
}
// Set our server date if requested.
// Can be useful to see how long it took for a message to arrive.