Reputation: 988
i want to create an intranet mailing system using java.so suggest me which API and what classes to use.
Upvotes: 1
Views: 2755
Reputation: 4925
Try this library: http://github.com/masukomi/aspirin
It can actually send email (some kind of embedded MTA):
public class Main { public static void main(String[] args) throws MessagingException { MailQue que = new MailQue(); MimeMessage mes = SimpleMimeMessageGenerator.getNewMimeMessage(); mes.setText("test body"); mes.setSubject("test subject"); mes.setFrom(new InternetAddress("[email protected]")); mes.setRecipients(Message.RecipientType.TO, "[email protected]"); que.queMail(mes); } }
Upvotes: 0
Reputation: 20617
Without doubts use Apache Commons Email - it's an industry standard.
Commons Email aims to provide a API for sending email. It is built on top of the Java Mail API, which it aims to simplify.
Some of the mail classes that are provided are as follows:
Upvotes: 1