Get your CodeRanch badge!*
The moose likes Other JSE/JEE APIs and the fly likes Java Mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Java Mail" Watch "Java Mail" New topic
Author

Java Mail

amit jangir
Greenhorn

Joined: Jan 12, 2010
Posts: 1
How to mail without using a mail server.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
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

Java Resources at www.wbrogden.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39575
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4639
    
    5

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
Marshal

Joined: Mar 22, 2005
Posts: 39575
    
  27
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

Joined: Jul 17, 2009
Posts: 22
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


SCJP 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Mail
 
Similar Threads
uncompleted article !
WA #1.....word association
Mozilla 1.4
Lost my Javaranch Login details
Gmail Invites..any takers..?