• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Mail

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to mail without using a mail server.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic