Generate Message-Id header per RFC 5321 3.6.4.

Ticket: #7156
(cherry picked from commit d391f6fdfa41a6a901aa298f94e2477366861028)