Problem with Date: on eMail-Messages sent

I use EMailMessage and SMTPSecureSocket to send confirmations to clients.
Works ok, no complaints.
But lately I get more and more bounce emails regarding RFC 5322 violations.
In this case it’s a xojo 2024r4.2 webserver running on ubuntu and sending emails via a hoster.
Cause is the line with Date: like:

Date: Mon, 24 Mar 2025 11:37:47 0000

It should be (at least) regarding RFC 5322 chapter 3.3

Date: Mon, 24 Mar 2025 11:37:47 +0000
or
Date: Mon, 24 Mar 2025 11:37:47 -0000

Better of course would be a date with the correct timezone like:

Date: Mon, 24 Mar 2025 11:37:47 +0200 (CET)

Is smtpsecuresocket responsible for this line (then it’s maybe a bug), or where gets this line added?
Can I somehow modify the behavior?

This is the old RFC 2822 and you are correct, probably some server is strictly waiting for + or - or are now not accepting the deprecated format.

For RFC 5322 the SMTP should convert the time for GMT +0000 and just put the string “GMT” at the end as

Date: Mon, 24 Mar 2025 11:37:47 GMT

I think that Xojo need to update the involved SMTP classes.

Just the reason I wrote all my own methods for handling email headers in and out, and using only sslsocket. That combined with careful study of the relevant RFCs.

It seems that

Date: Mon, 24 Mar 2025 11:37:47 +0000

is preferred over

Date: Mon, 24 Mar 2025 11:37:47 GMT

Because such term GMT is also marked for obsolescence.

So Xojo, should study and test.

Can you create an issue for Xojo to investigate?

The other thing you don’t get with Xojo mail classes (as far as I know) is encoded word treatment for some header items such as subject lines or file names for attachments, which allows for subject lines and filenames to contain other than ASCII. See Wikipedia for encoded words.

Done.

https://tracker.xojo.com/xojoinc/xojo/-/issues/78759

Will you submit a feature request? I did not find something regarding this in the tracker.

Have issues with that (german vowel mutations), too.

I don’t use email related stuff from Xojo at all because bug fixing is very slow. See for instance https://tracker.xojo.com/xojoinc/xojo/-/issues/74008 . Curl or Chilkat work much better. For Sendgrid I’m now using the API version which wasn’t really complicated to add.

No, I just built the support into my app. Meaning that a user wanting to send attachments which have UTF8 filenames can do so. Some very old email clients see the incoming filenames as garbage but I have no sympathy. This is part of the Mime standard - there are RFCs which specify the format.