Wednesday, June 17, 2009

I m getting the exception for unknown smtp hostname in my email server project using jsp javamail package..?

For yahoo


Incoming Mail Server (POP3):pop.mail.yahoo.co.in


Use SSL, port: 995, use authentication


Outgoing Mail Server (SMTP):smtp.mail.yahoo.co.in


Use SSL, port: 465, use authentication





If ur other codes are allright, it should work.





After ur additional info:





It's not ur local server. So u need the javax.mail.Authenticator to connect to it even for sending. Carefully go through the API Docs. Then Subclass Authenticator and override method getPasswordAuthentication().


Then use





public static Session getInstance(java.util.Properties props,


Authenticator authenticator).





I mean Session.getInstance(java.util.Properties props,


Authenticator authenticator).





U also need 2 use SMTPS protocol for SSL connection.


That will do the magic.





U need fair amount of knowledge of SMTP/POP/IMAP apart from JavaMail API.





U r welcome to send me ur code. but yahoos messaging service allows only 1500 chars including whitespaces !!!!!








" if you have any code which is working fine then send it to me on my mail address"





I shall provide u suggestions, discuss ur problems, point out ur mistakes.





Just like any other professional I have my own APIs which works fine.


But u can't expect a professional to distribute those. :)





After ur additional info:





Did u try my previous suggestions?





I never disclose my mail ID in public. No one should. If one does Spammers spam him to death.





I can't mail u because, u haven't allowed emails in ur YA profile.





Click on my AVTAAR. That will take u 2 my YA profile. From there u can send me a message using yahoos messaging service. That way u can send me ur mail ID without disclosing it in public. I shall mail u back from my mail ID. If u need too detail explanations, I shall xplain those over Skype.





Usually my replies may be a little late. That's because I answer about 10 to 15 technical queries per week. U should understand. But there will alwasys be replies.

earn extra money

No comments:

Post a Comment