• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

automatically sent email reminder using JAVA

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am posting this in this section, as I am not sure if this requirement could be achieved in JSP/Servlet. Please correct me if I am wrong.
I'm developing a mini Course booking application using JSP-Servlet. One of the requirement is to automatically send out reminder to registered user with reminder of the training, say, a day prior to the training. All the information is kept in mySQL database.
Basically, I need the application to check on a daily basis (from the database) and then sent out the email.
The OS is Windows 2000 Server. Application Server is Tomcat 4.1.
I know I could use the schedular in Windows to trigger the daily check.
I'm very new to Java and not sure how to move into the next step.
Could anyone please help.
Thanks in Advance,
TJ
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
You can set the task in winows and generate one db class which will the make connection and retrive the result and other which we will send the email and call this class from class which is registered with task.
Regards
Prashant
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears to me that you do know how to use Windows scheduler, but you dnon't know how to write the program to read the database and send out e-mails.
One way to access mySql using Java is the use the JDBC library. For a good basic tutorial on how to use JDBC, check out the JDBC chapter in a book called Just Java. If you want a more hands-on example, download and install the mckoiDB database engine . It's free, small, and has some great sample code that should help you get up and running. 95% of the code that you should need to complete the db-related portion of your program should be included with that application.
Now that you have the names, how are you going to e-mail them? Well, that has a lot to do with the e-mail application(s) that your company uses. There's a JavaMail library available, but it might not work in your system; check with your sysadmins to see what options are available.
Also, I wouldn't recommend creating a JSP or servlet to accomplish your tasks. A simple, standalone Java program with a public "main" method is your best choice.
HTH!
[ August 07, 2003: Message edited by: Tom Purl ]
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use Java sockets and the SMTP protocol to send emails. Check out this link
[EMAIL]http://www.developerfusion.com/show/1975/[/EMAIL]
Sridhar
reply
    Bookmark Topic Watch Topic
  • New Topic