This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I'm having difficulties solving an issue with sending email from a jsp page. when i use the smtp host name provided by my ISP it just work great...but if the web application is run on another machine with a different ISP connection it doesn't work...the client can't provide me with his smtp sever host ...
so i'm thinking of ways to connect to a free public smtp server and use it to send email....i tried myjavaserver.com but without success (i don't know if their services r still available).
I thought then using a free open source minimal smtp server in the form of a jar library...i can use it to send email from jsp. does some one knows of such minimal smtp servers ? (need it to be free open source) I would appreciate any other solution to my problem.
You will find a "free public SMTP server" hard to find. If such a thing existed, it would quickly be discovered and used by spammers to send unsolicited advertising. Then it would quickly be blacklisted and most other SMTP servers would stop accepting messages from it.
Apache James is a free open-source SMTP written in Java. You could experiment with that. But make sure that if you are sending messages from your SMTP server and the "from" address is, let's say, "email@example.com", that your server is set up correctly. It must be set up so that it will be the SMTP server for "something.org", otherwise many other servers will do a reverse DNS check and decide you are sending forged messages. (Nothing stops you from using "firstname.lastname@example.org" as your "from" address, but other servers can tell you are not sending it from Microsoft's domain.)
So, besides an SMTP server you are going to need a domain name. I doubt that you can get away with using your IP address, e.g. "From: email@example.com", either.
I suppose that apache james should be installed and setup on the same machine running my web application. right ?
How about using public smtp servers like gmail ? do u have an Idea on how to use gmail to send emails ? is it reliable to use such servers (myjavaserver.com , gmail etc..) or would it be some security restrictions ?
If you wanted to use Apache James, then just like any other SMTP server it could be installed on any machine anywhere. Your programs would just need to be able to connect to it over the network.
As for gmail, you could use that. Your code would have to authenticate itself to the server, and naturally you would have to be sending from a gmail address. Other Internet mail servers (for example the one I use, which isn't Hotmail) also allow authenticated access but there's usually a small annual fee. If any of them allow connections from a program, they should also provide you with documentation on how to do that.