JavaMail Bodypart problems
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   alex_gillis
Posted On:   Thursday, May 30, 2002 11:24 AM

HI: I've been scouring the web and cannot see what must be a simple solution to this problem: I can send an email if I do not create and add the text portion to a BodyPart and just send it with message.setContent(message,"text/plain") This will mail the message out fine. As soon as i attempt to create a MimeBodyPart, and add the message to a MimeMultipart, the message data no longer sends. The mail sends witht the subject line, and useremail sent out fine, but there is no content being added to the messge. All the headers are there: Mime-Version : 1.0 Content-Type multipart/mixed;boundry="----_Part_3487   More>>

HI:

I've been scouring the web and cannot see what must be a simple solution to this problem:


I can send an email if I do not create and add the text portion to a BodyPart and just send it with


message.setContent(message,"text/plain")


This will mail the message out fine.


As soon as i attempt to create a MimeBodyPart, and add the message to a MimeMultipart, the message data no longer sends. The mail sends witht the subject line, and useremail sent out fine, but there is no content being added to the messge.


All the headers are there:


Mime-Version : 1.0

Content-Type multipart/mixed;boundry="----_Part_34879 etc

Date: Thu etc etc


but the message text part has not been added.


I did find one person who was having the same problem (getting the email with email address and subject sent only), but it turned out the had not included the activation.jar in their path. However, mine is ok.



Tried two different environments - tomcat on win200 and tomcat on osX and the same results. Also tried two different smtp hosts.



I've been over and over and over the syntax for building a multipart message, but I cannot see what is wrong. Any pointers much appreciated ;>

   <<Less

Re: JavaMail Bodypart problems

Posted By:   John_Zukowski  
Posted On:   Thursday, June 6, 2002 06:35 PM

If you check the FAQ, you'll find several examples.
About | Sitemap | Contact