• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Mail  RSS feed

 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to send a mail from my java code but i am never able to do it. The exception that i get is this :

javax.mail.NoSuchProviderException: Invalid protocol: null
at javax.mail.Session.getProvider(Session.java:431)
at javax.mail.Session.getTransport(Session.java:650)
at javax.mail.Session.getTransport(Session.java:631)
at javax.mail.Session.getTransport(Session.java:617)
at SendMail.sendMail(SendMail.java:60)
at UserDetailsServlet.sendRequest(UserDetailsServlet.java:117)
at UserDetailsServlet.processRequest(UserDetailsServlet.java:44)
at UserDetailsServlet.doPost(UserDetailsServlet.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
............

I have seen the previous queries posted in this forum and i tried to use it but it doesn't seem to work for me. The code that i am using is this..



Could anyone tell me where am i wrong?

Thanks,
Bitz.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java Mail questions belong in our "Other Java APIs" forum; I will move this there for you.
 
Casper Maxwell
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use a normal email server(Something using POP3 for getting emails and SMTP for sending emails). Yahoo does not need to support the protocols like POP3 or SMTP since it is web-based. Or at least make sure that it supports these protocols and enabled if it requires enabling.
 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My outlook express has been configured to send and recieve messages using the same protocols. And how should i determine if yahoo is enabled or not ?
If i don't use netbeans and just compile the class in a normal text file and run it i get this error
Invalid Protocol : null

What could be the problem ?

Thanks
Bitz
 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
After i made a simple change in my code, i am getting this error :

Error here!! 530 authentication required - for help go to http://help.yahoo.com/help/us/bizmail/pop/pop-11.html

This link tells me that this seems to be the end of the road.
Is there no way out of this ?

Thanks,
Bitz
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're writing an e-mail client. So you have to do the same things as any other e-mail client. Reading the instructions on how to configure the other clients linked to from that page, I see three things to note:

1. You have to use authentication.

2. Don't use SSL.

3. Configure POP as well as SMTP. (Maybe this means connect with POP first?)
 
S bitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It seems that Yahoo does not support this functionality from any other program except the list that it has provided. But i used gmail instead and it worked. But yes i had to take care of authentication.

Thanks,
Bitz
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!