Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to configure localhost to send email.

 
malik ge
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to send email from localhost through javamail.

I am able to send the mail through Google smtp. Now I want to send it through localhost.

I have found out that there is a "James open source Java server" for sending email.
But I could not find any help on how to configure it.

I am using NetBeans and Tomcat7.0

any help...

Thanks
 
Paul Clapham
Sheriff
Posts: 21316
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's because only people who understand how Internet e-mail works, and more specifically what trouble you can cause by starting up a badly-secured SMTP server, should be doing that. I suspect that you don't; if you did then you would be likely to be able to look at the package and figure out how to set it up. So I recommend you not to set up your own mail server yet.
 
malik ge
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I agree with you.
But I want to do this only for test purposes.

Here is the code through which I can sent mail through gmail smtp,

if someone could tell me, anything about localhost smpt server that would be helpful.
I don't know which port or smtp host James java server use.

 
malik ge
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any help...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you lucky enough to be on a Mac? If so, you can just use the built-in postfix mailer. Start it with:

sudo postfix start

If you're on Windows, I don't have any suggestions.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What, specifically. are you looking for that isn't covered somewhere around http://james.apache.org/server/2/index.html ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic