Last freebie
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17890
interpreted = N
texte = I'm not sure if the people at PCS are smart and secretive, or they were justbluffing.. Let me explain. For some time I've wondered how to send one emaila day with an attached database of the day's catalog requests. The commonwisdom is that Emailer (the included simple mailer) can't add attachments.Therefor we just have to be a little more creative. Here's the part I can'tfigure out. PCS has in the manual (page 202) the specs to build an emailfile (and they allude to Mime headers). So why don't they include a file inthe distribution similar to what's at the bottom of this message? Maybe theyhad done it, and didn't feel like sharing? Maybe they didn't do it, butwanted us to think it was doable until one of us up and did it. Well, here Iam. (enough horn tooting)This is the last of the source code I can give away for a while. I blew theengine in my 4Runner, and at 5K apiece, well, I have to charge somebody forsomething...Announcing the SafeCommerce Admin module plug-in package. Just drop thisdirectory (admin) into a running website, change 7 includes, and you have aprofessional comprehensive Administration area for new AND experiencedwebsite owners. I'll have screen shots online soon... I haven't decided on the price.I'm also rewriting the database helper to actually be a usefully tool.(probably a separate package)The following file will search a database (catreq.db) and send all ofyesterdays entries as an attached file in an email. (if this word wraps,you'll have to undo that yourself, sorry.) Depending on how this email issent, the spaces between fields should be tabs.[writefile file=../WebCatalog/EMailFolder/CR[cart][random]&secure=T]To:[where]From: webserver@safecommerce.comSubject: Catalog RequestsDate: [date %a, %d %b %Y %H:%M:%S %Z]MIME-Version:1.0Content-Type: multipart/mixed; boundary=============_[cart]This is a multi-part message in MIME format.--============_[cart]Content-Type: text/plain; charset=us-asciiContent-Transfer-Encoding: 7bitContent-Disposition: inlineHere are yesterday's catalog requests.[search db=catreq.db&eqDATEdata=[math date]{[Date]}-1[/math]]Catalog requests for: [date] Number of requests: [numfound]--============_[cart]Content-Type: text/plain; name=catreq[date %m%d%y].txt; charset=iso-8859-1Content-Transfer-Encoding: quoted-printableContent-Disposition: attachment; filename=catreq[date %m%d%y].txtName Company Address1 Address2 City State Zip country Phone[founditems][Name] [Company] [Address1] [Address2] [City] [State] [Zip][country] [Phone][/founditems][/search]--============_[cart][/writefile]That's it. Feel free to donate to the Brian needs a new engine fund if youfind this useful. Brian B. Burton BOFH - Department of Redundancy Department--------------------------------------------------------------- MMT Solutions - Specializing in Online Shopping Solutions 973-808-8644 http://www.safecommerce.com
Associated Messages, from the most recent to the oldest:
|
- Last freebie (Brian B. Burton 1998)
|
I'm not sure if the people at PCS are smart and secretive, or they were justbluffing.. Let me explain. For some time I've wondered how to send one emaila day with an attached database of the day's catalog requests. The commonwisdom is that Emailer (the included simple mailer) can't add attachments.Therefor we just have to be a little more creative. Here's the part I can'tfigure out. PCS has in the manual (page 202) the specs to build an emailfile (and they allude to Mime headers). So why don't they include a file inthe distribution similar to what's at the bottom of this message? Maybe theyhad done it, and didn't feel like sharing? Maybe they didn't do it, butwanted us to think it was doable until one of us up and did it. Well, here Iam. (enough horn tooting)This is the last of the source code I can give away for a while. I blew theengine in my 4Runner, and at 5K apiece, well, I have to charge somebody forsomething...Announcing the SafeCommerce Admin module plug-in package. Just drop thisdirectory (admin) into a running website, change 7 includes, and you have aprofessional comprehensive Administration area for new AND experiencedwebsite owners. I'll have screen shots online soon... I haven't decided on the price.I'm also rewriting the database helper to actually be a usefully tool.(probably a separate package)The following file will search a database (catreq.db) and send all ofyesterdays entries as an attached file in an email. (if this word wraps,you'll have to undo that yourself, sorry.) Depending on how this email issent, the spaces between fields should be tabs.[writefile file=../WebCatalog/EMailFolder/CR
[cart][random]&secure=T]To:[where]From: webserver@safecommerce.comSubject: Catalog RequestsDate: [date %a, %d %b %Y %H:%M:%S %Z]MIME-Version:1.0Content-Type: multipart/mixed; boundary=============_
[cart]This is a multi-part message in MIME format.--============_
[cart]Content-Type: text/plain; charset=us-asciiContent-Transfer-Encoding: 7bitContent-Disposition: inlineHere are yesterday's catalog requests.[search db=catreq.db&eqDATEdata=[math date]{
[date]}-1[/math]]Catalog requests for:
[date] Number of requests: [numfound]--============_
[cart]Content-Type: text/plain; name=catreq[date %m%d%y].txt; charset=iso-8859-1Content-Transfer-Encoding: quoted-printableContent-Disposition: attachment; filename=catreq[date %m%d%y].txtName Company Address1 Address2 City State Zip country Phone
[founditems][Name] [Company] [Address1] [Address2] [City] [State] [Zip][country] [Phone][/founditems][/search]--============_
[cart][/writefile]That's it. Feel free to donate to the Brian needs a new engine fund if youfind this useful. Brian B. Burton BOFH - Department of Redundancy Department--------------------------------------------------------------- MMT Solutions - Specializing in Online Shopping Solutions 973-808-8644 http://www.safecommerce.com
Brian B. Burton
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:
possible, WebCat2.0 and checkboxes-restated (1997)
Return records from another (1997)
Encrypted Templates Serving as Text (2000)
Configuring E-mail (1997)
Working with framesets (1998)
why am I getting an authenticate dialog with no [protect]? (2000)
Re[2]: Date Time Oddness (1999)
Range search (2003)
First postarg not taking in $Commands (1997)
Nesting format tags (1997)
Convert Chars Q (2000)
PDF Writefile problem (2005)
Any problems with Welcome & WebCat? (2000)
Couple of techno questions (1999)
Problems getting parameters passed into email. (1997)
Database Field Additions (2000)
how to post without certain data appearing in the html source (2001)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
webcat- multiple selection in input field (1997)
Opinion: [input] should be called [output] ... (1997)