• Post Reply Bookmark Topic Watch Topic
  • New Topic

error : mail using jsp

 
Himanshu Bisht
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I have a java program for sending mail.I am using gmail snmp for sending mail. Works absolutely fine.

Now I thought of using the same program (code) to send mail from JSP. Everything runs fine till it tries to send mail using

Transport.send(msg);

where as same thing runs fine in java.
Not able to figure out what and where I am incorrect.


error:
Sending failed; nested exception is:
class javax.mail.AuthenticationFailedException

Note: cannot be an authentication error as same working fine in java program.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cannot be an authentication error as same working fine in java program.

According to the JavaDocs, a failure of username / password to pass authentication is the only cause of AuthenticationFailedException.
Obviously there is some significant difference between your standalone app and your JSP implementation. Are you using exactly the same class to send the mail? Probably not, so think about whats different.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!