|
Thanks
everyone for all the assistance, both on the list and off, and for the updated
documentation. I figured it out and have it working properly
now.
Dave
Attached are two files that are currently in
development to demonstrate how the @email and @emailsession tags work and
interact with POP3 mail. The email.taf file creates an object called
mailproc and the following parameters are passed into the mail method
call:
* action - specified tasks to perform -
[getids,list,getheaderonly,getall] ; * port - typically 110 for a POP3
service; * username - the username required to log on to the mail server
; * password - the password required to log on to the mail server; *
server - mail server IP address.
The mail.tcf file opens an email
session and depending on the 'action' method variable specified, a number
of tasks are performed. For example, if method$action = "" then
all of the message(s) information is retrieved and the attachments are
written to disk. The email session is then closed and an array containing
the mail details is passed back to email.taf.
Obviously a class file
need not be used to do this as all of the email retrieval and processing
could be done in a single more complex taf. However, for more experienced
users, I would recommend the use of a tcf or a custom tag such as
@POP_MAIL. In a normal results this would take the
form:
<@POP_MAIL username="@@request$username"
password="@@request$password" server="@@request$serveripaddress"
action="" port="110">.
More information on how custom tags
can be used is available in the help files of the Witango Studio or with
the Custom Tag Generator on http://developer.witango.com
The
above functionality could also be modelled to keep track of message threads
by writing the messages to a database and automatically linking the emails
together (child to parent) based on the in-reply-to-id or references or
subject. These new tags also allow for the operation of a mail client
on any site/server running Witango. A full featured working example of
a Witango mail client will be available to download soon.
If you
have any questions/comments please do not hesitate to contact
me.
Regards,
Fergal
Fergal Donlon Witango
Technologies Suite 4, Level 1, 44 Miller Street, North Sydney,
2060
|