Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Mail

 
amit jangir
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to mail without using a mail server.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All mail has to go through a mail server.

If you have a permanent address you can run a Java mail server - for example the open source James server.

Bill
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out https://aspirin.dev.java.net/ - it is an embeddable send-only mail server written in Java. In other words, it implements SMTP, but not POP or IMAP.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:it implements SMTP, but not POP or IMAP.


Which is by definition, what a "mail server" does. As originally posted, I don't think its possible. You can't send mail without talking to a Mail Transfer Agent aka MTA.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote:
Ulf Dittmer wrote:it implements SMTP, but not POP or IMAP.

Which is by definition, what a "mail server" does.

Not sure which definition you go by, but some mail servers handle outgoing mail only, while others handle both incoming and outgoing mail; so it's important to state what Aspirin does. I'm fairly certain that the question is about whether the sending side needs a mail-sending process that's outside of the mail-sending client, and the answer to that is no. If the question is, in fact, about something else, then Amit can clarify.
 
Raphael Okochu
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I dunno what you mean by sending mails without a mail server but if you mean testing your javamail application, you can use mock-javamail- just drop the jar in your classpath and it will look like you are connected to a mail server. But this is used for testing and debugging only. Download the jar from grep code
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic