Lines 353-359
Link Here
|
353 |
MimeBodyPart mbp = new MimeBodyPart(); |
353 |
MimeBodyPart mbp = new MimeBodyPart(); |
354 |
|
354 |
|
355 |
// set the content in the bodypart |
355 |
// set the content in the bodypart |
356 |
mbp.setContent(myparent.getBody(), myparent.getType()); |
356 |
mbp.setContent(myparent.getBody(), getContentType(myparent)); |
357 |
|
357 |
|
358 |
// add the message as the first bodypart in the multipart object |
358 |
// add the message as the first bodypart in the multipart object |
359 |
multipart.addBodyPart(mbp); |
359 |
multipart.addBodyPart(mbp); |
Lines 380-386
Link Here
|
380 |
} else { |
380 |
} else { |
381 |
try { |
381 |
try { |
382 |
// set the message with a mimetype according to type set by user |
382 |
// set the message with a mimetype according to type set by user |
383 |
message.setContent(myparent.getBody(), myparent.getType()); |
383 |
message.setContent(myparent.getBody(), getContentType(myparent)); |
384 |
} catch (MessagingException me) { |
384 |
} catch (MessagingException me) { |
385 |
// this error is not very likely to occur |
385 |
// this error is not very likely to occur |
386 |
throw new JspException("The message could not be set in " + |
386 |
throw new JspException("The message could not be set in " + |
Lines 438-443
Link Here
|
438 |
*/ |
438 |
*/ |
439 |
public final ArrayList getError() { |
439 |
public final ArrayList getError() { |
440 |
return error; |
440 |
return error; |
|
|
441 |
} |
442 |
|
443 |
/** |
444 |
* get the content type, possibly including character set |
445 |
* |
446 |
* @return - complete encoded content type |
447 |
*/ |
448 |
public String getContentType(MailTag parent) { |
449 |
String type = parent.getType(); |
450 |
String charset = parent.getCharset(); |
451 |
|
452 |
if (charset == null) { |
453 |
return type; |
454 |
} |
455 |
|
456 |
return type + ";charset=" + charset; |
441 |
} |
457 |
} |
442 |
} |
458 |
} |
443 |
|
459 |
|