MimeTag can be null but should be guess based on file name. See also https://stackoverflow.com/a/44907420/441662. This solves https://github.com/bbottema/simple-java-mail/issues/163.