Implementing an email server in java - java

What all language components will have to be used for implementing an email service system using java?

If you want to implement an email server (SMTP, IMAP, POP3) - there is already Apache JAMES. It's open-source, so you can look into its sources if you insist on making one.
If you want to just send emails, having an already installed SMTP server, then use Simple Java Mail or commons-email. Both sit on top of Jakarta Mail (previously JavaMail) and are very developer-friendly.

for SMTP subethasmtp rocks

Maybe look at Apache JAMES.
The Apache JAMES Project delivers a rich set of open source modules and libraries, written in Java, related to internet mail and news which build into an advanced enterprise mail server.

Related

access outlook mail server using java

I want to access my enterprise outlook account mounted on a server using java program.. already tried JAMES.. but it does not look to be the right option.. any suggestions (using java)
Did you try the JavaMail API? It has different options to connect to an Exchange server:
http://java.sun.com/products/javamail/Third_Party.html

Java GroupWise Mail Client

Is anyone aware of a way to retrieve and send mails by talking directly to the GroupWise server.
I want to be able to retrieve mail using Java if possible.
I wrote a Outlook Plug-In that retrieved mail out of GroupWise via the Groupwise Outloop Plug-in (If that makes sense).
Then dropped the message in a directory where I retrieved it with a Java App.
The problem is that I cannot add more than one GroupWise account in Outlook and need to.
I had a look at this question, but would like to know if there is a Java API
that will allow me to retrieve/send mail from the GroupWise server in a JavaMail like manner.
Thanks.
GroupWise allows mails to be retrieved using IMAP and POP3 which are standard supported by JavaMail. (And outlook too for that matter)
Sending mail should also be possible using smtp.
If it is for plain email I prefer to use these basic proptocols like smtp, pop3 and imap because they work almost everywhere, anytime and on any platform. They are less feature rich than the proprietary protocols, but that point is often not very relevant since many of these features are only meaningful for a subset of the mailclients out there.

Does java mail do what this commercial email component does out of the box for free?

I need to be able to pull emails into a web application, basically provide a full email interface like gmail (subject, from, attachments, embedded images, etc etc), pulling email via POP or IMAP.
the commercial product is here: http://www.chilkatsoft.com/java-email.asp
Do I need that product or will java mail do all this for me?
You can do a subset of what ChillKat Java Email does with Javamail.
Check out the Javamail project on Kenai,
http://kenai.com/projects/javamail/sources/mercurial/show
in particular the IMAP package:
http://java.sun.com/products/javamail/javadocs/com/sun/mail/imap/package-summary.html
and the POP package:
http://java.sun.com/products/javamail/javadocs/com/sun/mail/pop3/package-summary.html
You might also want to look at James and the way James uses Javamail for mail retrieval.
http://james.apache.org/
Mailet might provide some reusable components, but I've not used it so far.

Possible to connect to Outlook WebMail via Java?

I want to create a java program to connect to an outlook webmail server to check for unread emails. I am not looking for an open source java based email client etc.. etc..
I am basically asking if it is possible to create a Java interface to an Outlook Webmail Server. I have been trying to hunt down how I would even begin to do this and it isn't inherently clear. Thanks..
You can use WebDav interface before exchange 2007 or EWS (Exchange Web Services)in Exchange 2007+
EWS Reference - http://msdn.microsoft.com/en-us/library/bb204119.aspx
Also a blog that may start u off with webdav
http://blogs.msdn.com/dotnetinterop/archive/2008/07/21/connecting-java-to-exchange-over-webdav-with-apache-httpclient.aspx
You could also try to have a look at the free exchange clients. Maybe you'll find informations regarding the protocol there.
Apache is developing a API for it Apache POI using which u easily can connect to outlook....

What is the easiest way for a Java application to receive incoming email?

Sending email is easy with commons-email, and with spring it is even easier. What about receiving incoming email? Are there easy to use APIs that allow to bounce emails, process attachments, etc.
SubEthaSMTP Mail Server allows you to create your own SMTP Server for receiving emails.
James is probably your best bet, but email handling is extremely complex, requiring not only configuration of your MTA (the James server), but also DNS. In the past, I've found it easier to initiate my handlers via hooks from non-Java MTA's like postfix. And procmail might also be useful to you. For a Java MTA though, James rocks.
Apache Commons Net is the perfect library to fetch mails via POP3. IMAP is not supported.
Review the Mail component from apache camel
http://camel.apache.org/mail.html
See if Sun's own JavaMail (API docs) suits your needs.
I'm not sure about easiest, but at least it is a widely used way.
Check jGuru's JavaMail tutorial here. There are ways to read and detach attachments.

Categories