File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Sending mail with empty content. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Sending mail with empty content." Watch "Sending mail with empty content." New topic
Author

Sending mail with empty content.

Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Hi All,

I had a small problem by sending mail , from my application i can able to send mail but it is empty content, through sample application it is working fine,
But from web application which is running in Tomcat 6.0 it is sending mail without content, could anyone please explain what might be the problem.
code :


Highly appriciated if anyone give any solution.

Thanks.

Regards
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Where's the code that constructs msg?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Sry for the late reply

Here is the code :



Thanks,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

We'll get the code that creates and fills topLevelMultipart next week?
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115

Hey Rob,

Iam really sry for the late, I wasn't able to be online.
Anyways Thank you for your time, if possible gimme some solution to work smooth,

Thanks,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
I think Rob's point was that without knowing what's in "topLevelMultipart" it's hard for us to advise what else to try.

Have you tried printing out its value right before it's used?


Ping & DNS - updated with new look and Ping home screen widget
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Ulf is right. You call setContent using something we know nothing of. Perhaps (probably) the problem is in that one.
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
The total code is here :





iam calling the method with appropriate values.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
In that case my question becomes: Have you verified that "msgText" is not, in fact, empty?
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
I think it is not empty , i tried with giving hard coded text as well, but it is still persist.
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Rob ,

can i have any suggestion on this go ahead to work around,
Please let me know if you have any ideas , and Thanks alot for your time.

Thanks,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

To be honest, I have no idea why it's not working. Your code looks just fine to me.
Naresh Talluri
Ranch Hand

Joined: Oct 12, 2007
Posts: 115
Thank you for your time, if i found anything surely i'll post in this thread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending mail with empty content.
 
Similar Threads
Javamail error
Transport.send problem
Regarding Mail Server Connect
authentification for smtp
JavaMail - why doesn't this work???