Possible package...not quite proposed
| From: | Tony Bibbs | Date: | Tue, 11 Feb 2003 22:28:11 +0000 |
| Subject: | Possible package...not quite proposed | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-13150@lists.php.net to get a copy of this message | ||
A few days ago I posted a note about a Sendmail hack that allows
programmers a way to implement email-based interfaces to their
applications. Well, I'd like to expand on that a bit and let you all give
it a gander to see if there is value in having it in PEAR (some code clean
up would have to occur).
The package is quite simple. It allows you to implement an arbitrary set
of commands against an application. The application I'm working with, for
example, will eventually have commands to submit a story, approve a
submission, submit a link, disable a user account, etc. I have this
working with Sendmail/Procmail setup and have implemented a fairly simple
help system and a single command to work with an application I'm working
on. I think with a small amount of effort could work with other
MTA's/MDA's as well as with non-web based applications.
The process for building commands is quite simple and a sample command is
included as a reference. Here is a sample request for help. This would
be sent in the body of an email message:
command: help submitstory
username: tony
The email response is:
This is how to use the submitstory email command. Put the text below into
an email message. Be sure to substitute everything between the
angle brackets:
command: submitstory
username: <username>
topic: <topic>
title: <title>
mode: <html or plaintext>
story: <story text>
Anyway, start by looking at the code here and start with reading the
INSTALL document:
http://cvs.geeklog.net/chora/cvs.php/email_connector
--
Tony Bibbs "I guess you have to remember that those who don't
tony@tonybibbs.com hunt or fish often see those of us who do as
harmlessly strange and sort of amusing. When you
think about it, that might be a fair assessment."
--Unknown