aspose file tools*
The moose likes Servlets and the fly likes java mail configuration??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "java mail configuration???" Watch "java mail configuration???" New topic
Author

java mail configuration???

mocca az
Ranch Hand

Joined: Mar 07, 2001
Posts: 93
Greetings,
Can someone please expalain to me what do i need to have and how to configure java mail? I have javamail and JAF set to classpath, but nothing happens, i mean, no email is being sent. Do i actually need to have email server on my PC? I need some help here.
Greatly appreciated,
m,phx
Rehan Malik
Ranch Hand

Joined: Jul 09, 2001
Posts: 76
You need to have access to a SMTP server to send the mail. There may be a few free providers but you'll have to look around.


Rehan Malik
Zoe Peng
Ranch Hand

Joined: Nov 27, 2000
Posts: 112
take a look @this http://www.jspinsider.com/tutorials/jsp/javamail/jspjavamail_installation.view
I tested this before, it works for me.
Juan Zhang
Greenhorn

Joined: Apr 19, 2001
Posts: 13
Hi Zoe,
I tested the "simplemail.jsp" example posted on this website. But I got an error, it says: Unknown SMTP host: smtp.mail.Rediff.com; nested exception is...
I have two Rediff.com email acounts and they worked fine when I sent e-mail through the internet.
Which "SMTP host" do you use? Do you know any other "SMTP host" I can use to test this example?
Thank you very much.
Juan Zhang
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Try telnetting to your SMTP host, port 25, to verify that there is indeed an SMTP server listening there. If you're seeing a server hello then it's ok. If you're seeing an hourglass you have your mail server wrong.
It is not possible to use a different mail server. To combat spamming and other abuse, mail servers generally don't accept mail from un-authenticated users outside their own domain. And if I knew any servers that did I certainly would not wish such information out on the streets.
- Peter
PS. In fact, that is not true. SMTP servers won't relay mail, i.e. they won't accept mail intended for other hosts.
Juan Zhang
Greenhorn

Joined: Apr 19, 2001
Posts: 13
Peter,
Thank you very much for your reply.
I tried other SMTP host like yahoo.com, but still got an error: javax.mail.MessagingException: Could not connect to SMTP host: smtp.mail.yahoo.com, port: 25....
I think the reason is that some Internet Service Provider (like Juno, Netzero, FunCow) block remote ports 53 and 25. I read an article talk about this.
Thanks again,

Juan Zhang

[This message has been edited by Juan Zhang (edited November 06, 2001).]
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Surely your ISP cannot block access to their own SMTP server. Without it, you wouldn't be able to send e-mail.
- Peter
Juan Zhang
Greenhorn

Joined: Apr 19, 2001
Posts: 13
Peter,
Thank you so much for your help. I really appreciate.
Finally, the jsp mail works.
Juan

[This message has been edited by Juan Zhang (edited November 17, 2001).]
[This message has been edited by Juan Zhang (edited November 29, 2001).]
Jayson Falkner
Author
Ranch Hand

Joined: May 07, 2001
Posts: 57
Glad you got the example working!
Just thought I'd mention the tutorial has an FAQ: http://www.jspinsider.com/faq/javamail.view
Many of the questions asked happened to be there too!
It is also true that some ISP block port 25. Although these are usually the free internet providers. I have yet to see a paid service that blocks this port.


Jayson Falkner<br />jayson@jspinsider.com<br />Author of <a href="http://www.jspbook.com" target="_blank" rel="nofollow">Servlets and JavaServer Pages; the J2EE Web Tier</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java mail configuration???