File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes An Automated Newsletter System Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "An Automated Newsletter System" Watch "An Automated Newsletter System" New topic
Author

An Automated Newsletter System

amir sabahi
Greenhorn

Joined: Dec 15, 2008
Posts: 3
Hello everybody,
The task is to develop a newsletter application which runs on a mail server.It has to send new product info to subscribed users.Application has to fulfill the following :
1.It has to send emails to users who have subscribed on daily,weekly and monthly newsletter.
2.app has to check whether any new product is added to database or not and if yes at 12pm send emails to daily users.For weekly and monthly it is based on their registration day and date .
3.It has to be fully automated So that automatically search for people who has to receive the newsletter .

OK, Actually I have no idea about applications which has to run on server 24/7 becoz I'm a web programmer.How and where to start and is java mail API a good choice for this project?

Thank you in advance
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31079
    
163

Take a look at the Timer class.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
Web apps also run 24/7, don't they? :-)

Instead of using a permanently running Java application that uses a Timer, I'd use a scheduling facility (like cron on Unix or Windows Task Scheduler) to run a Java application every time you want to send mails.
amir sabahi
Greenhorn

Joined: Dec 15, 2008
Posts: 3
Jeanne Thank you very much.

Ulf ,web apps are loaded on servers and they run when user trigger it ;I think so :-)
And your answer is exactly what I wanted Thank you.

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
web apps are loaded on servers and they run when user trigger it

Yes, but you can also use a ServletContextListener to set up scheduled background threads. I'm just mentioning this in case you already have a related Java web app running. It might be easy (and might make sense) to hook this into it.
amir sabahi
Greenhorn

Joined: Dec 15, 2008
Posts: 3
you can also use a ServletContextListener to set up scheduled background threads.

Aha ,I did not think about that.Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: An Automated Newsletter System