Gmail has recently imposed new restrictions on emails sent to any Gmail account or domains hosted on Gmail's GSuite. One such rule is related to the Message-ID header that causes emails to be rejected if this header is missing.
The actual error message reads:
550 5.7.1 [x.x.x.x] Messages missing a valid Message-ID header are not accepted.
Here, x.x.x.x is the IP address of your SMTP server.
According to RFC 532, specific headers, such as From, Date, and Message-ID, should be included in every email message. Most email servers do not take any action if any of these headers are missing. Gmail has recently started to reject emails if any of these headers are missing.
Unfortunately, many legacy applications written years ago never followed these guidelines and are now encountering problems when sending emails to any domain hosted on GSuite.
There are two solutions to this problem: