Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage
In directory sc8-pr-cvs1:/tmp/cvs-serv16908/modules/core/src/com/babeldoc/core/pipeline/stage
Modified Files:
Tag: branch_1_0
SmtpWriterPipelineStage.java
Log Message:
Avoid to create an empty body when ther is no "smtpMessage" defined
Index: SmtpWriterPipelineStage.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/pipeline/stage/SmtpWriterPipelineStage.java,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -C2 -d -r1.5 -r1.5.4.1
*** SmtpWriterPipelineStage.java 8 May 2003 12:57:02 -0000 1.5
--- SmtpWriterPipelineStage.java 25 Jun 2003 20:58:32 -0000 1.5.4.1
***************
*** 279,296 ****
}
! //First create message body
! BodyPart messageBody = new MimeBodyPart();
! if (message == null) {
! message = "";
! }
! //messageBody.setText(message);
! messageBody.setContent(message, contentType);
!
! //Multipart will hold body and attachments
! Multipart multipart = new MimeMultipart();
!
! //set body
! multipart.addBodyPart(messageBody);
//now set all attachments
try {
--- 279,292 ----
}
! //Multipart will hold body and attachments
! Multipart multipart = new MimeMultipart();
+ //First create message body
+ if (message != null){
+ BodyPart messageBody = new MimeBodyPart();
+ messageBody.setContent(message, contentType);
+ multipart.addBodyPart(messageBody);
+ }
+
//now set all attachments
try {
|