Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mail API in java

 
Swathi Shri
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Swathi Shri
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know why this code not works. Once I click the button in Java script page in the front end  I need to get a key through the mail which Im not getting.
I  dont know where I went wrong.
 
Tim Moores
Saloon Keeper
Posts: 3326
61
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the code being executed? All of it? Put in a lot of logging of relevant variables so you know which lines get executed, and whether the variables have the values you think they should have. Also post the entire stack trace if there is one.
 
Swastik Dey
Rancher
Posts: 1721
8
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Executed the code, didn't find anything wrong.
 
Tim Moores
Saloon Keeper
Posts: 3326
61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does that mean that you did this:
Put in a lot of logging of relevant variables so you know which lines get executed, and whether the variables have the values you think they should have.

? Post the output from it. Also make sure you set the "mail.debug" property to "true" before you call any JavaMail code - you'll get plenty of debugging output that way. Post that here as well.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!