Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending mail with empty content.

 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20526
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where's the code that constructs msg?
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sry for the late reply

Here is the code :



Thanks,
 
Rob Spoor
Sheriff
Pie
Posts: 20526
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We'll get the code that creates and fills topLevelMultipart next week?
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rob Spoor
Sheriff
Pie
Posts: 20526
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf is right. You call setContent using something we know nothing of. Perhaps (probably) the problem is in that one.
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The total code is here :





iam calling the method with appropriate values.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case my question becomes: Have you verified that "msgText" is not, in fact, empty?
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is not empty , i tried with giving hard coded text as well, but it is still persist.
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20526
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be honest, I have no idea why it's not working. Your code looks just fine to me.
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your time, if i found anything surely i'll post in this thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic