When I inspect the message as it’s being sent, it has the header as it’s send thru SMTPSecureSocket, but when the email is received the header isn’t there.
The mail server software should add to the header but not removed header fields. The email software can change the email. Mail, for instance, does that.
Please check with CURL or the Chilkat plugin. With the latter I get the additional header fine:
x- are not rfc conform and spammers can add fake data.
i found at google
X-header fields are usually preserved but ignored by messaging servers and clients that don’t use them and organizations may opt to disable the headers from their outbound emails.
As it turns out, it’s the users desktop email client that is removing the header. @Beatrix_Willius thanks for your reply, it made me take a closer look at where the issue really resides. And @MarkusR thanks for jumping in on this too.
For posterity and anyone else who might stumble on this post, here’s the offending email client: