aspose file tools*
The moose likes JSP and the fly likes Sending Scheduled Emails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Sending Scheduled Emails" Watch "Sending Scheduled Emails" New topic
Author

Sending Scheduled Emails

moomoo
Greenhorn

Joined: Sep 16, 2002
Posts: 1
anyone has any idea on how i can do schedule emails?
i need to send emails at scheduled times, so i will store their content and time to be sent in the database.
question is: how do i check/know that it is time to start sending?
any comments/suggestions will be greatly appreciated
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31075
    
232

This is probably better done in a servlet than a JSP. In the init method, you can start a thread that repeatedly sleeps for a certain amount of time. Every time it wakes up, the thread can check if it is time to send out the e-mail.


[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
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Welcome to the Ranch moomoo!
You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
Thanks!
bear
JSP Fourm Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Jeanne is quite correct in that JSP is not a suitable technology for this feature. You might also want to consider implementing this as a stand-alone console Java application that you can run as a daemon process.
bear
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending Scheduled Emails