-3

I am writing a JAVA program for a fictional dentist company. The program needs to send an email reminder mail 48 hours before the actual appointment with an email template that can be edited in the program.

Im stuck with how to send an email reminder 48 hours before the appointment. The appointments are stored in the database and de column is a date type.

oscarteg
  • 187
  • 1
  • 10

2 Answers2

1

You can use quartz to schadule sending email see some examples here For sending email follow this

Morteza Adi
  • 2,413
  • 2
  • 22
  • 37
0

You would either have to write a heart beat code to check for the time and let your application run forever. Or you code take advantage of a Framework like Spring and use the Spring Scheduler feature which does what you need.

The 3rd option is to run your program on a server and use the server's scheduler feature.

Mohammad Najar
  • 2,009
  • 2
  • 21
  • 31