org.springframework.mail.javamail.MimeMessageHelper currently only supports the deprecated java.lang.Date class for setSentDate.
While this is clearly because jakarta.mail.internet.MimeMessage is the same, it would be helpful for the helper to provide conversion from e.g. java.time.Instant, so callers do not need to suppress warnings when using it.
org.springframework.mail.javamail.MimeMessageHelpercurrently only supports the deprecatedjava.lang.Dateclass forsetSentDate.While this is clearly because
jakarta.mail.internet.MimeMessageis the same, it would be helpful for the helper to provide conversion from e.g.java.time.Instant, so callers do not need to suppress warnings when using it.