• 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

JavaMail : "Access not allowed"

 
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to forward mail through SMTP. but I always have problem. "Access not allowed", but I am sure I put right password there.

Could you give me some hints ?

Thanks




 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most likely the SMTP server isn't configured to allow your computer to relay messages through it. I would suggest talking to the administrator of the server about that.
 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Before asking my SMTP server, I want to get help, is my coding right ?

Thanks
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A cursory glance suggests its OK. But rather than relying on us as a test harness, I'd download Dumbster and test your code with it as your server. That way you will know for sure what are coding errors and what are administration/configuration issues.
[ December 05, 2005: Message edited by: Paul Sturrock ]
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code looks "right" in the sense that it compiles and appears to use some APIs in the way their documentation suggests. Whether it will actually work successfully with your server is another question. Most of the JavaMail examples I see that require authentication (which you don't yet know is necessary) use an Authenticator instead of that version of the connect() method. If you haven't seen those examples, there's one here:

http://java.sun.com/developer/onlineTraining/JavaMail/
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic