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:
Date problems-more (1997)
[Applescript] (2000)
Quick Question About Sorting (1997)
AUTONUMBER (2003)
IP Address (2001)
WebCat2 - Getting to the browser's username/password data (1997)
CMS - Formatting Content (2004)
More on the email templates (1997)
Help! WebCat2 bug (1997)
SMSI FTP - calander system THANKS! (2002)
[WebDNA] More wish-list requests implemented (2016)
Tech question about web dna actions (1998)
Location of Browser Info.txt file (1997)
Can I invoke an ssi plugin from within a webcat page (1997)
Reversed words (1997)
[isfile] ? (1997)
Webmerch Error (1998)
[OT] Google Info (2004)
Sort Order on a page search (1997)
WebDNA to IM connectivity? (2006)