• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mail send

 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to send mail I have to include java.mail and setup my own mail server if I know how, which I don't,
or glue to gmail or something, which brings in other limitations.

I hear PHP has a module that you include in your project and you are ready to go, no external mail servers !

Is there something like that for java outthere ?
 
Lester Burnham
Rancher
Posts: 1337
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, there is: the Aspirin library is an embeddable send-only mail server.
 
Rob Spoor
Sheriff
Pie
Posts: 20659
64
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James is a mail server written in Java. You can try that.
 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so, I went with aspirin, works fine but want to know if mail was realy posted...... By instructions there:


And since it is success, hasSucceeded becomes true. But I have no idea how it is ment to read that outside this class ?
Need help about that.

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add a public getter method that allows access to the boolean variables from outside the object.

Or you can add a callback into some other code that handles it.
 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could do that, public getter.
But, what is this, it removes itself(as far as I can see) in last line, how can I read it then ?


EDIT: hmm, or tihs is realy in its essence olny example and I shoud move all que.removeWatcher out of this class, or something.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should definitely customize the class to suit your needs.

That line simply removes that watcher object from the mail queue - it does not otherwise alter the object, so you can still use it any way you like (assuming that you have stored a reference to it somewhere, obviously).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic