aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Problem with sending mail thorugh java api Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Problem with sending mail thorugh java api" Watch "Problem with sending mail thorugh java api" New topic
Author

Problem with sending mail thorugh java api

ashwini kalmath
Greenhorn

Joined: Oct 24, 2011
Posts: 25
hello,

i am generating email and sending it . it runs fine in development mode. but i get an error in deployment mode ....

CODE:


ERROR :
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583)
at javax.mail.Service.connect(Service.java:313)
at javax.mail.Service.connect(Service.java:172)
at javax.mail.Service.connect(Service.java:121)


Please help me out.

thank you
Aggarwal Arpit
Ranch Hand

Joined: Mar 04, 2012
Posts: 86
Remove these three lines and then try

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18669
    
    8

Nowadays there is no need to mess about with socket factories when you want to use JavaMail and Gmail to send your e-mail. Have a look at what the JavaMail FAQ says about that.
 
 
subject: Problem with sending mail thorugh java api