Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending mail - Y! Mail - failed

 
Shashank Agarwal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I've got a funny problem. I've got a JSP that is supposed to send mail. Well, it does so alright, but when i try sending a mail to Yahoo Mail, it executes perfectly, but I'm not recieving the mail.

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you send an email to a non-yahoo address? Does that work? Have you checked your Spam folder in Yahoo to make sure Yahoo doesn't think it's malicious?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Other Java APIs forum.
 
Shashank Agarwal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It isnt in the bulk folder either.
here's its code


When i tried sending mail to another account in indiatimes.com, it didnt go. But when i sent it to thejavahub@thejavahub.com, it did.

Pls hlp...
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be your SMTP server. Does it require authentication? It could require authentication to send mail to domains outside of it's own. I'm just throwing around ideas here.

You probably should install an SMTP server on your PC and test it that way.
 
Shashank Agarwal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you provide authentication in the code. I mean, where shall i enter the password, if i'm supposed to do so.

Is it possible that i use another smpt server to send my mails?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you implemented Transport and Connection handlers? Its a very good way to see what's going on - since they can be made to report Transport and Connection events. You also should turn on SMTP debugging so you can see the SMTP messages. I reckon an authentication exception would be obvious (though I can't say for sure - I've never tried to use an SMTP server that needs authentication - since authentication is not part of the SMTP spec.).

Your SMTP server (thejavahub.com) - try teleting to it and sending a mail that way. If you can do this then JavaMail should work. If you can't send to anything other than thejavahub.com addresses I'd suggest you check how your server is configured.
 
Shashank Agarwal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. I've asked my host for the server configs. Thanks to Gregg and Bear too. I'll get back to you guys immidiately after whatever happens
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic