aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Sending emails through your Java program? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Sending emails through your Java program?" Watch "Sending emails through your Java program?" New topic
Author

Sending emails through your Java program?

Alan Smith
Ranch Hand

Joined: Oct 19, 2011
Posts: 150

Hi,

I am just wondering is there any developers in the know about how to send emails through a program. I have looked all over the place and it seems very complicated and that I have to learn the mail protocols. Any advice on where to start on even the simplest of programs that just emails a line of input text would be a help. I could go from there.

Thanks
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2407
You don't need to learn lots about email protocols. The Java API for handling email is called JavaMail, and its home page is at http://www.oracle.com/technetwork/java/javamail/index.html. There's a very extensive FAQ with lots of example code as well. If you don't have a mail server which you can (or want to) use, check out Aspirin: https://github.com/masukomi/aspirin
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Sending emails through your Java program?
 
Similar Threads
Java program to be run from a batch file
Sending Mail via socket - attachments?
questions about email
Ignoring email sending failure in JavaMail.
Log4j - Problem in using SMTPAppender with gmail