org.springframework.mail doesn't support multiple replyTo-adresses

Suggestion: implement like to, cc or bcc

Scenario where this is needed:

  1. i have a process which informs a user to do a task.
  2. when he has finished the task he has to inform several other users by mail
    (the users to inform depend on the task)
  3. so it would be very helpfull if the process could set the other users as a replyTo inside the mail

Comment From: sbrannen

Assuming you are talking about Spring's MailMessage support...

javax.mail.internet.MimeMessage.setReplyTo() accepts an Address[] array; whereas, org.springframework.mail.MailMessage.setReplyTo() only accepts a single String.

So I agree that it could make sense to support an Address[] array.

The main question is how we would support that in the existing MailMessage API without introducing a breaking change.

One option would be to introduce a new default method that accepts a varargs String... addresses argument, but that default interface method would likely have to throw an UnsupportedOperationException in the default implementation.

@jhoeller, what are your thoughts on the matter?

Comment From: rweisleder

Is this a duplicate of #12616?

Comment From: sbrannen

Is this a duplicate of #12616?

Indeed, it covers the same subject.

@jhoeller, has your stance stated in https://github.com/spring-projects/spring-framework/issues/12616#issuecomment-453357031 changed?

If not, we can close this issue as a duplicate.

Comment From: frissner

Yes, but javadoc seems to be out of date;

See https://coderanch.com/t/678644/java/JavaMail-setting-multiple-reply-values https://coderanch.com/t/678644/java/JavaMail-setting-multiple-reply-values

you can also test with the attached project MailDemo.zip

Von: Sam Brannen [mailto:notifications@github.com] Gesendet: Donnerstag, 11. Juni 2020 18:04 An: spring-projects/spring-framework Cc: Rißner, Florian; Author Betreff: [ext] Re: [spring-projects/spring-framework] Support multiple replyTo addresses in MailMessage (#24289)

Is this a duplicate of https://github.com/spring-projects/spring-framework/issues/12616 #12616?

Indeed, it covers the same subject.

https://github.com/jhoeller @jhoeller, has your stance stated in https://github.com/spring-projects/spring-framework/issues/12616#issuecomment-453357031 #12616 (comment) changed?

If not, we can close this issue as a duplicate.

— You are receiving this because you authored the thread. Reply to this email directly, https://github.com/spring-projects/spring-framework/issues/24289#issuecomment-642775004 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AAL76JU63MWJLZVQLIFGA23RWD6AHANCNFSM4KCONNAA unsubscribe.https://github.com/notifications/beacon/AAL76JVY7XLBH4BJNPTOH23RWD6AHA5CNFSM4KCONNAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZH7PXA.gif

Sophos PureMessage has replaced this part of your message with this text.

Incident information:

Event: Suspicious attachment detected Location: MailDemo.zip Message ID: 9762b416cce74a58a63a24c268dd5ea4@med.uni-jena.de Date: 12.06.2020 Time: 13:03:19 Server: SM-EXCH3 Job: SMTP Attachment type: Java class file

Comment From: bclozel

Closing as a duplicate of #12616