Michael Dinowitz wrote:

> Most mailing lists read only the first line to process commands. You can 
> get that by using 
> ListFirst(postbody, chr(13))
> This will take the postbody and return the first line. From there, you 
> can search the string for commands. The Regular Expression (RE) tags are 
> rather good for this. 


Every mailinglist I have ever used accepted more than one line of 
commands. If you end a line with a \ even multiline commands are 
generally possible.

Looping over the email treating it as a list with delimiter chr(13) will 
indeed work (don't forget to strip the email from chr(10) as well). Loop 
all the way until the end or until you find a line with only the keyword 
END (for people who are unable to remove certain signatures such as from 
automated email scanners).
Next concatenate lines ending in a \. Then replace every control and/or 
space character with a space. After that ListFirst(line," ") will return 
the command and the rest of the line will be the space delimited arguments.

Jochem

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to