Regarding send a mail automatically for birthdays before 3 days
surya.raaj prakash
Ranch Hand
Joined: Oct 30, 2009
Posts: 76
posted
0
HI Friends,
I have one requirement,i.e How to create SOL Query send a mail automatically for birthdays before 3 days?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
SQL and JDBC are for accessing databases, not for sending mails; check out the JavaMail API for that (the JavaEnterpriseEditionFaq has helpful links about it).
Or are you asking how to do a query to get dates less than 3 days away? If so, what database are you using? Have you looked at the date functions for that database?
Jeanne Boyarsky wrote:Or are you asking how to do a query to get dates less than 3 days away? If so, what database are you using? Have you looked at the date functions for that database?
Hi Jeanne Boyarsky,
Yes,
MySql,
yes,I have looked at date functions but i couldn't get the right query to to send mail before 3 days..
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
OK, so the problem has nothing to do with sending emails, and everything to do with writing a SELECT statement. Post the statement you have used so far, and describe which records it -correctly or incorrectly- selects. Also tell us the data types and sample values of the involved attributes.