cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24340] New: - SendMailTransformer only sends one message - ever.
Date Mon, 03 Nov 2003 04:34:32 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24340>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24340

SendMailTransformer only sends one message - ever.

           Summary: SendMailTransformer only sends one message - ever.
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: general components
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: dean.cording@kaz-group.com


When using the SendMailTransformer the first message is sent but all subsequent 
messages, in the current or subsequent requests, are not sent even though the 
transformer reports that they are.

A look at the code reveals that the transformer is reusing the smtpMessage 
object for all subsequent messages after the first.  This smtpMessage object 
will have the dateSent property set after the first message and the SMTP 
transport in Sun's implementation of JavaMail API appears to ignore messages 
that have previously been sent.

There would also be other side effects of reusing the smtpMessage object 
because the subject and message body would not be changed for subsequent 
messages sent in the current or following requests.

FIX:
Remove lines 476 and 477

476:   if (this.smtpMessage == null) {
477:          this.smtpMessage = setUpMessage(session);
478:   }

Mime
View raw message