• Post Reply Bookmark Topic Watch Topic
  • New Topic

Another java mail question  RSS feed

 
mike sutton
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have copied the sendmail code from "Professional Java Server Programming". I keep recieving the 'There was an error sending the message' error that is called in the code. I think it is because the smtp host is wrong. here is the code.

I have altered the code to try to hard code the smtp server. But other than that it is directly from the book. Does anyone have a clue as to why this is not working?
thanks in advance.
 
mike sutton
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nevermind I figured it out.
I forgot a line of code.
I added this line

after the line

and it works fine now
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!