Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An Automated Newsletter System

 
amir sabahi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the Timer class.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can also use a ServletContextListener to set up scheduled background threads.

Aha ,I did not think about that.Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic