This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
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?
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.
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: 35446
9
posted
0
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.