Pregunta

Currently , I'm recieving emails with my server(imap through spring framework)

the messages i recieve are of type MimeMessage.

lets say i now got a new email (X)

I would like to create a new MimeMessage (Y) that in it's body it will say that this email is in response (reply) to (X)

how can i do this?

p.s the (Y) message is going to be sent from a different SMTP url later on, so X and Y are not related.

thanks.

¿Fue útil?

Solución

Simply create the new message and set its content to whatever you want - presumably something like...

"In Reply To:\n\n" + copied_text_content_from_received_message;

However, be aware that the inbound content might have various formats, including multipart (see JavaDoc for MimeMessage.getContent().

Otros consejos

Start with the Message.reply method. Fill in the content of this new Message as suggested in the other answer here.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top