Hello,
I'm learning Java and i want to build a program that save emails to an *.txt file, like this: One guy send me an email, then the program periodically search if i have emails every 10 minutes and if i have it saves all the emails in a single *.txt file, remember that is only one file, like emails.txt and if the file already have emails on it, the program inserts the content of the new emails down the others. All this is because i want to develop for me an integration of my emails and a system that i'm developing.

Remember that the email that have to use in this aplication is: nathanjava@yahoo.com

Thanks,
Nathan Paulino Campos

Recommended Answers

All 2 Replies

Hello,
I'm learning Java and i want to build a program that save emails to an *.txt file, like this: One guy send me an email, then the program periodically search if i have emails every 10 minutes and if i have it saves all the emails in a single *.txt file, remember that is only one file, like emails.txt and if the file already have emails on it, the program inserts the content of the new emails down the others. All this is because i want to develop for me an integration of my emails and a system that i'm developing.

Remember that the email that have to use in this aplication is: nathanjava@yahoo.com

Thanks,
Nathan Paulino Campos

Not sure if this is just a text parsing and saving program or whether you want to send the e-mails through Java or if it's a full e-mail management program.

the program periodically search if i have emails every 10 minutes

I wouldn't have a clue on how to do that. Java Mail might come in handy. I've played with Java Mail and sent e-mails OUT with it, but that sounds a lot easier than what you're trying to do. Once you get the e-mail into your program, parsing it and sticking it into a text file is certainly doable. Setting a timer to fire every ten minutes sounds simple enough, but I've never tried to check an e-mail server like Yahoo Mail using a Java program, which is what I think you're trying to do. Anyway, here's a link for Java Mail. Might be useful.

http://java.sun.com/products/javamail/

Thanks, i'm going to read about JavaMail.

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.