bbottema/simple-java-mail

Be able to fix the sent date for a new email

Glassalau opened this issue · 3 comments

I was wondering if it was possible to set the sent date with the date is given inside the headers. Actually "produceMimeMessage()" in org.simplejavamail.converter.internal.mimemessage.MimeMessageHelper always set the sent date with a new date.

I would like to choose my mail's sent date when sending it with the sendMail() method in org.simplejavamail.mailer.Mailer.

MimeMessageHelper.java:94
setHeaders(email, message);
message.setSentDate(new Date());

Best regards,

Glassalau

Hello @Glassalau, that's a nice enhancement. I'll include it in the upcoming 6.0.0 release!

Released in 6.0.0-rc1.

6.0.0 has released as well, finally.