Skip to content

Add java.time support to MimeMessageHelper#36954

Open
arnabnandy7 wants to merge 1 commit into
spring-projects:mainfrom
arnabnandy7:gh-36936
Open

Add java.time support to MimeMessageHelper#36954
arnabnandy7 wants to merge 1 commit into
spring-projects:mainfrom
arnabnandy7:gh-36936

Conversation

@arnabnandy7

Copy link
Copy Markdown

This commit introduces support for setting the sent date of mail messages using 'java.time.Instant'. The 'setSentDate(Instant)' method is added as a default method on 'MailMessage' and implemented/overridden in 'MimeMessageHelper' and 'MimeMailMessage'.

This allows developers using modern Java time APIs to avoid legacy and deprecated 'java.util.Date' conversions and warnings.

Closes gh-36936

This commit introduces support for setting the sent date of mail
messages using 'java.time.Instant'. The 'setSentDate(Instant)'
method is added as a default method on 'MailMessage' and
implemented/overridden in 'MimeMessageHelper' and 'MimeMailMessage'.

This allows developers using modern Java time APIs to avoid legacy
and deprecated 'java.util.Date' conversions and warnings.

Closes spring-projectsgh-36936

Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add java.time support to MimeMessageHelper

2 participants