Re: Date search and sendmail
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13753
interpreted = N
texte = >I was wondering if there was a way to a search of a db for specific>appended date and then do a mass mailing to email addresses relative to the>found dates.Hi Kevin,Yes, WebCat can do this!Here's a solution that will do exactly what you need, provided youuse the default MM/DD/YYYY date format to store your dates in thedatabase. I have no idea if my WebDNA code will work with your customdate format because I store my dates in the default format, but youcan try it and see what happens:1- Create a new text file called 'LastSentDate' and type the nameKen into it, then save it and put it in the same folder as yourHome Page.2- Put this WebDNA code into your Home Page:[hideif [date]=[include LastSentDate]][search db=XXX.db&eqdatedata=[math date]{[date]}-30[/math]][founditems][sendmail to=[email]&from=YYY&subject=ZZZ]Hey, this is your reminder message![/sendmail][/founditems][/search][writefile LastSentDate][date][/writefile][/hideif]3- If your Home Page does *not* get requested at least once a day byyour visitors, you will have to request it yourself. The above WebDNAonly works when someone requests the page it's in.Isn't WebCatalog awesome? :)Sincerely, Ken GromeWebDNA Solutions808-737-6499http://www.hui.net/dna/webdna.html
Associated Messages, from the most recent to the oldest:
>I was wondering if there was a way to a search of a db for specific>appended date and then do a mass mailing to email addresses relative to the>found dates.Hi Kevin,Yes, WebCat can do this!Here's a solution that will do exactly what you need, provided youuse the default MM/DD/YYYY date format to store your dates in thedatabase. I have no idea if my WebDNA code will work with your customdate format because I store my dates in the default format, but youcan try it and see what happens:1- Create a new text file called 'LastSentDate' and type the nameKen into it, then save it and put it in the same folder as yourHome Page.2- Put this WebDNA code into your Home Page:[hideif
[date]=[include LastSentDate]][search db=XXX.db&eqdatedata=[math date]{
[date]}-30[/math]]
[founditems][sendmail to=[email]&from=YYY&subject=ZZZ]Hey, this is your reminder message![/sendmail][/founditems][/search][writefile LastSentDate]
[date][/writefile][/hideif]3- If your Home Page does *not* get requested at least once a day byyour visitors, you will have to request it yourself. The above WebDNAonly works when someone requests the page it's in.Isn't WebCatalog awesome? :)Sincerely, Ken GromeWebDNA Solutions808-737-6499http://www.hui.net/dna/webdna.html
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
HTML tags inside textarea (2000)
RAM variables (1997)
Three new problems ... (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997)
New Lawsuit Alleges Unitedhealth/Pacificare Deceived (2006)
WebTen and WebCat (1997)
Setting up shop (1997)
Plugin or CGI or both (1997)
Draft Manual, Tutorial, and more (1997)
[taxrate] question (1997)
WebCat2 - storing unformatted date data? (1997)
How replace title with buttons.jpg (2000)
CC Processors question (2002)
Wierd problem with 3.08 WIN Version (2000)
Initiating NewCart (1997)
Problems with [Applescript] (1997)
WebCat2: Found Items syntax, etc. (1997)
Items XX to XX shown (1997)
Date Range Issue (2006)
Comments in db? (1997)