I have created a mailet which echos an email back to the sender as if it was sent by the recipient.
I have been changing the Recipients, From, and ReplyTo properties of the MimeMessageWrapper (Or the MimeMessage directly) and I use the saveChanges() method. The email is properly delivered to the client (outlook express) with the correct From and To values displayed in the client.gui. However, I also append a dump of the message properties and headers. None of the properties or headers reflect the changes in the dump. Server side dump in the mailet after saveChanges is executed. When I do not produce the dump, the content is preserved. When I produce the dump the content is missing. This may add additional data to the "header" problem. What's going on? Rick Boehme ----- Original Message ----- From: "Noel J. Bergman" <[EMAIL PROTECTED]> To: "James Users List" <[EMAIL PROTECTED]> Sent: Tuesday, October 22, 2002 5:13 AM Subject: RE: InternetHeaders mistery > > 1) yes, of course I invoke saveChanges() but it doesn't help me :-) > > 2) every time I set the subject I can then immediately retrieve > > the changed version, why isn't that happening inside a service > > method of a mailet? > > This one, if I recall correctly, is because the Subject header is cached by > the MimeMessageWrapper when it first loads the message. You won't see the > change immediately. I fixed a related issue before, but I only fixed the > generic headers, not the standard ones that have their own MimeMessage > setter. I'll take a look at it again, if no one beats me to it. > > See MimeMessageWrapper.setSubject() and MimeMessageWrapper.getSubject(). > Sorry that I did not catch onto this one earlier. > > --- Noel > > > > -- > To unsubscribe, e-mail: <mailto:james-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: <mailto:james-user-help@;jakarta.apache.org> > -- To unsubscribe, e-mail: <mailto:james-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:james-user-help@;jakarta.apache.org>
