• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error : mail using jsp

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic