Thanks, but what is "Quartz"? -----Original Message----- From: Eric Pugh [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 1:34 PM To: 'Turbine Users List' Subject: RE: how to delay sending email
Quartz is your solution! It can schedule them to run on a unregular basis, just make each reminder email a separate job... -----Original Message----- From: jill han [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 1:39 PM To: Turbine Users List Subject: RE: how to delay sending email Thanks. But the first email notification is not a scheduled event, it is triggered by a client survey. Whenever the survey is done, the application will send the first email. Now I want the second email to be send one or two days later as a kind of reminder. Is there any way to shedule a job on unregular basis ? Thanks. Jill -----Original Message----- From: Jeffery Painter [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 12:34 PM To: Turbine Users List Subject: Re: how to delay sending email Sounds like you need to schedule an event. just changing the calendar date on the email object is not going to set "when" the email will be sent. as soon as you call email.send() the email will be sent, regardless of the time/date stamp sitting on it. there is an integrated scheduler with turbine for something like this, or I believe others have recommended quartz as a replacement to the turbine scheduler. On Thu, 20 Jan 2005, jill han wrote: > Hi, here is a situation. > I want to send an email when an event occurs. And later on I want to > send another email to the other addresses to ask if they responded to > that email. Here are the part of codes. > > VelocityHtmlEmail email = new VelocityHtmlEmail(context); > email.setFrom(fromAddress); email.setSubject("Survey Alert!"); > email.addTo(toAddress()); email.setHtmlTemplate(emailTemplate); > try{ > email.send(); > } catch(Exception err) { > log.debug(err.toString()); > } > > > Calendar cal = Calendar.getInstance(); int day = cal.get(cal.DATE) + > 1; cal.set(Calendar.DATE, day); email = new > VelocityHtmlEmail(context); email.setFrom(fromAddress); > email.setSubject("Response Alert"); email.addTo( toAddress()); > email.setSentDate(cal.getTime()); > email.setHtmlTemplate("emailTemplate"); > try{ > email.send(); > } catch(Exception err) { > log.debug(+ err.toString()); > > } > > > However, I got two mails at the same time. > What went wrong? > > Thanks in advance. > > Jill > -- Thank you, Jeffery Painter 2431 Reunion Meadows Lane Apex, NC 27539 voice: 919.321.0378 - -- [EMAIL PROTECTED] http://jeff.kiasoft.com PGP FP: 9CE8 83A2 33FA 32B1 0AB1 4E62 E4CB E4DA 5913 EFBC -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U YNXabx7DZOV2Hd9LwSTmGpY= =dWiu -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]