AFAIK, SMTP requires the message-id header, so this "upstream" of which you speak must be outside of the scope of email infrastructure. In this case, looking at this article, the API for sending an email using broken-apart components--a body and recipients and subject--is missing what should be a required parameter for at least a fragment of the message-id, if not the entire thing. Like, this code must be generating a new/random message-id internally for the messages it constructs for them to even be sendable... that, or the API it is itself using to send mail is itself broken by not exposing this detail.