if (! this.attachmentList.isEmpty() || !this.alternativeBody.equals("")) {
// Multipart nur bei Attachments!
// send the body
MimeBodyPart bodypart = null;
MimeBodyPart alternativeBodypart = null;
MimeMultipart multipart = null;
if (this.haveAlternative()){
multipart = new MimeMultipart("alternative");
}else{
multipart = new MimeMultipart();
}
bodypart = new MimeBodyPart();
if (contentType.startsWith("text/")){
bodypart.setContent( this.body,this.contentType + ";charset= " + this.charset);
}else{
bodypart.setContent( this.body,this.contentType);
}
multipart.addBodyPart(bodypart);
// Alternativer Body gesetzt? Nur wenn keine Attachments vorhanden!!!
if (this.haveAlternative()){
alternativeBodypart = new MimeBodyPart();
if (contentType.startsWith("text/")){
alternativeBodypart.setContent( this.alternativeBody,this.alternativeContentType + ";charset= " + this.alternativeCharset);
}else{
alternativeBodypart.setContent( this.alternativeBody,this.alternativeContentType);
}
multipart.addBodyPart(alternativeBodypart);
}
message.setContent(multipart);
// Encoding nur f�r Bodypart setzen
bodypart.setHeader("Content-Transfer-Encoding", encoding);
if (alternativeBodypart != null) {
alternativeBodypart.setHeader("Content-Transfer-Encoding", alternativeEncoding);
}
for (Iterator iter = this.attachmentList.values().iterator(); iter.hasNext();) {