• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaMail : "Access not allowed"

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • 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




 
Paul Clapham
Sheriff
Pie
Posts: 20971
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Before asking my SMTP server, I want to get help, is my coding right ?

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Pie
Posts: 20971
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic