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 just bluffing.. Let me explain. For some time I've wondered how to send one email a day with an attached database of the day's catalog requests. The common wisdom 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't figure out. PCS has in the manual (page 202) the specs to build an email file (and they allude to Mime headers). So why don't they include a file in the distribution similar to what's at the bottom of this message? Maybe they had done it, and didn't feel like sharing? Maybe they didn't do it, but wanted us to think it was doable until one of us up and did it. Well, here I am. (enough horn tooting)This is the last of the source code I can give away for a while. I blew the engine in my 4Runner, and at 5K apiece, well, I have to charge somebody for something...Announcing the SafeCommerce Admin module plug-in package. Just drop this directory (admin) into a running website, change 7 includes, and you have a professional comprehensive Administration area for new AND experienced website 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 of yesterdays 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 is sent, the spaces between fields should be tabs. [writefile file=../WebCatalog/EMailFolder/CR[cart][random]&secure=T]To: [where] From: webserver@safecommerce.com Subject: Catalog Requests Date: [date %a, %d %b %Y %H:%M:%S %Z] MIME-Version:1.0 Content-Type: multipart/mixed; boundary=============_[cart]This is a multi-part message in MIME format. --============_[cart] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-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-1 Content-Transfer-Encoding: quoted-printable Content-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 you find 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:

    
  1. Last freebie (Brian B. Burton 1998)
I'm not sure if the people at PCS are smart and secretive, or they were just bluffing.. Let me explain. For some time I've wondered how to send one email a day with an attached database of the day's catalog requests. The common wisdom 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't figure out. PCS has in the manual (page 202) the specs to build an email file (and they allude to Mime headers). So why don't they include a file in the distribution similar to what's at the bottom of this message? Maybe they had done it, and didn't feel like sharing? Maybe they didn't do it, but wanted us to think it was doable until one of us up and did it. Well, here I am. (enough horn tooting)This is the last of the source code I can give away for a while. I blew the engine in my 4Runner, and at 5K apiece, well, I have to charge somebody for something...Announcing the SafeCommerce Admin module plug-in package. Just drop this directory (admin) into a running website, change 7 includes, and you have a professional comprehensive Administration area for new AND experienced website 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 of yesterdays 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 is sent, the spaces between fields should be tabs. [writefile file=../WebCatalog/EMailFolder/CR[cart][random]&secure=T]To: [where] From: webserver@safecommerce.com Subject: Catalog Requests Date: [date %a, %d %b %Y %H:%M:%S %Z] MIME-Version:1.0 Content-Type: multipart/mixed; boundary=============_[cart]This is a multi-part message in MIME format. --============_[cart] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-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-1 Content-Transfer-Encoding: quoted-printable Content-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 you find 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:

Smart caching problems with 2.1b3? (1997) shipCost (1998) Limit to Field Length in DB (1998) Re:EMail not being sent (1999) [WebDNA] help with writefile (2012) Word search (1997) (1997) Whats wrong with this code? (1998) Nested tags count question (1997) String manipulation in Webcatalog (2001) Separate SSL Server (1997) Add more fields to an existent data base (1997) item sorting (1997) Listserver problem (1997) Can you do this??? and other stuff (1997) Separate SSL Server (1997) protect tag on NT IIS (1997) WebCatalog2 Feature Feedback (1996) [isfolder] and [filename] (1997) removelineitems (2000)