Re: Re: Bug: duplicate message ids
Chris Burdess <[email protected]> Thu, 26 Apr 2007 11:17:44 +0100
| Newsgroups | gmane.comp.java.classpath.extensions.javamail |
|---|---|
| Message-ID | <[email protected]> |
Boris Folgmann wrote: > Chris Burdess schrieb/wrote: >> I can update the algorithm to use the FQDN of the host, that's not >> a problem (although it means that GNU JavaMail will rely on Java >> 1.4 or later, I don't think that will be a problem for most people). > > Yes please, I think that would be a good idea. > >> If the second number is not changing, that indicates a much more >> serious problem. Could you give an example of the code you're >> using to create and send the messages? You're not reusing >> MimeMessage object instances? > > Both numbers (before and after the dot) are not changing, that's > why there are real duplicate ids. It's not my code, but I found the > right method in org.apache.log4j.net.SMTPAppender I think: > > ... > Multipart mp = new MimeMultipart(); > mp.addBodyPart(part); > msg.setContent(mp); > > msg.setSentDate(new Date()); > Transport.send(msg); It looks like the same message object is being reused. I have committed a patch which should solve both these problems, please could you test with CVS HEAD? _______________________________________________ Classpathx-javamail mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpathx-javamail