How to log email

Posted on 2007-10-01
Last Modified: 2013-12-13
I have got a project where we need to log every email that is sent from anywhere into the database.


John wants to log all of his conversation with Anne.
He do this by CC all of his email with Anne into

Our server then capture all emails that are sent into and store them into the database for the purpose of data mining.

what technology do I need to implement that?

ideally a linux server with php/java/open source software
Question by:kecoak
    LVL 19

    Expert Comment

    you know that the Email is not a serializable object in Java..
    i.e. you can not make the object to get stored as a "Email" per say..

    now if you want to have it stored in the data base in different fields ( i.e. to, cc, date, time, & content etc..) that can be done using the javamail APIs..

    Author Comment

    do i need an email server to receive all the emails? what email server is that?
    LVL 19

    Expert Comment

    >>He do this by CC all of his email with Anne into

    this mail needs to go to a server and it has to have a valid email address ( ) for example..

    then you can use Javamail to connect to this server and read mails off of it to store in your database...

    Author Comment

    what mail server that has to be installed? can i access the inbox of that email? please provide links for tutorial please
    LVL 19

    Accepted Solution

    you should be able to use whatever email server is being used at your org.
    you can even use the gmails and yahoos who provide a pop3/IMAP access for your test purposes..

    Here is a very good link for javamail tutorial..

    Author Comment

    still dont understand.

    Look in here:

    there is a section where you can send an email to

    and your message is recorded.

    how to do that?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Automapping, a wonderful feature with Exchange 2010 (SP2 onwards I believe), allows additional/Shared mailboxes that a user has access to be automatically mapped on Outlook client, simplifying the process by adding them while Outlook launches. Ho…
    Easy CSR creation in Exchange 2007,2010 and 2013
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now