Khramtsov.ilya@gmail.com without links

Not sure if this will really help - maybe your gmail organization has special settings configured which cause these problems; Do you have a gmail account outside your organization, a private one, f.ex.? If so, would it be possible to either forward one of the mails there (but they might already be broken at this point) or get mattermost to directly send an e-mail to a gmail address outside your organization? maybe some spam filters or other milters are causing this behaviour.

I’m not aware of changing the headers directly in Mattermost, there’s not really a configuration option to do so and the mail handling is done by Go libraries which probably cannot be influenced in that way, but if you managed to get a working mail in source, you can always resend that from your client or any server after making modifications to see where it stops breaking.