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.