Fully functional email client

I

iaoua iaoua

Hi all,

Newbie alert. I'm new to this newsgroup so please be nice to me. I'm not completely new to Perl but not exactly a Guru and not exactly much more than a complete novice so please bear with me.

My name is James Christian and I am PhD research student at the University of Essex in the UK. You can see a picture of me with my little daughter on my very basic webpage privatewww.essex.ac.uk/~jcread

Anyway, apart from machine tranlation research in my spare time I have developed a conversational agent that dialogues with users to find out what they are really looking for (gone are the days of simple keyword search). I have a growing base of experimental users for my alpha release who currently need to come into my office to use the system as it is not web borne. The system can take some time to answer questions because of the comlexity of the task (the system is still learning). It asks the user questions to figureout what they want and then sends them off to the right website or business that has the products, services, information or free downloads that they require

e.g.

Hi, how can I help you?
Where can I download music?
Erm, lots of different places what were you looking for exactly?
A song by U2?
Which song exactly?
....

This goes on until the system has completely matched the user's requirements. It can take some time for the inference engine to figure out a satisfying answer and if the answer turns out not to be satisfying then the system has to go into dialogue to make new suggestions and learn from user feedback.. As the system is slow at decision making my growing user base has asked if they can play with the system by email instead of having to sit in my office and wait for a long time for the system to generate responses.

So what I basically need is a solution I can drop my conversational agent into. Some kind of fully functional email client that already absracts away the details of receiving and sending messages. Generating message ids for threading. Extracting the new text which is the response to the last email etc. I need something I can just drop my agent into with minimal parameter setting such as configuring the SMTP and POP servers to be used, user name and password and port numbers etc. Something my system can just automatically hit the reply button to and respond to a question. Something my can easily extract the relevant text from without having to worry about implementation details of designing a full email client from first principals.

Basically, I need a command line version of Thunderbird but that already extracts the new line of text as input to my agent. Surely, there must be something like that out there already done in Perl. Can anyone point me to anything? Or is it noses to the grindstone time?

Thanks for any advice you can give me guys.

James Christian
http://www.iaoua.com
 
P

P E Schoen

"iaoua iaoua" wrote in message
Newbie alert. I'm new to this newsgroup so please
be nice to me. I'm not completely new to Perl but not
exactly a Guru and not exactly much more than a
complete novice so please bear with me.
Basically, I need a command line version of Thunderbird
but that already extracts the new line of text as input to
my agent. Surely, there must be something like that out
there already done in Perl. Can anyone point me to
anything? Or is it noses to the grindstone time?

I'm not sure I understand what you need, but I have recently developed some
simple Perl and PHP scripts that take user input, add it to a database, and
then put together HTML that is echoed to the user. It also generates
formatted HTML files for use by another HTML page, and it emails the
submitted content to me along with information about the user. It is
password protected and designed to thwart DoS attacks by incorporating a
file lock and delay which will bounce repeated accesses. And it also uses an
HTML purifier to clean up any possibly malicious HTML submitted by the user.

So, if you could use a website that allows user input, rather than having
users send emails, the rest of the project should be just a matter of
providing the feedback to the user until the desired resource is determined,
and then the user could click the URL that is recommended to see if it what
was needed.

I've become more comfortable with PHP than Perl, but I'm a novice at both.
However, I've been able to do what I needed to do, and now I'm just cleaning
it up and adding features.

I am not really familiar with Thunderbird, but there are simple mailer
functions in Perl and PHP that are easy to implement. And I'm not really
sure if email is even needed for your application. You just need a website
with hooks to your main application. For any client-side email, the user
would use his own default sendmail application (as with an href
"sendto:emailaddy"), and your server-side script can use the mail programs
supplied by the host. There may be other considerations depending on where
your application resides and what form of I/O it requires.

Paul
 
P

Peter J. Holzer

[Please format your postings to reasonable line length (about 70
characters/line). News clients do not generally wrap long lines and long
lines are hard to read. I have reformatted your posting.]


Anyway, apart from machine tranlation research in my spare time I have
developed a conversational agent that dialogues with users to find out
what they are really looking for (gone are the days of simple keyword
search). I have a growing base of experimental users for my alpha
release who currently need to come into my office to use the system as
it is not web borne. The system can take some time to answer questions
because of the comlexity of the task (the system is still learning).
It asks the user questions to figure out what they want and then sends
them off to the right website or business that has the products,
services, information or free downloads that they require

e.g.

Hi, how can I help you?
Where can I download music?
Erm, lots of different places what were you looking for exactly?
A song by U2?
Which song exactly?
...

This goes on until the system has completely matched the user's
requirements. It can take some time for the inference engine to figure
out a satisfying answer and if the answer turns out not to be
satisfying then the system has to go into dialogue to make new
suggestions and learn from user feedback. As the system is slow at
decision making my growing user base has asked if they can play with
the system by email instead of having to sit in my office and wait for
a long time for the system to generate responses.

In general I agree with Paul: Email seems to be an awkward choice for
what seems to be a dialog consisting of one-line messages. However, if
the response times are very long (several minutes or more) the
asynchronous nature of email is an advantage. As an alternative you
might consider an instant messaging system like XMPP (also known as
Jabber).

Perl has a number of modules for accessing mail at various places (local
folders, POP, IMAP, ...), parsing it, and sending it by various means
(local sendmail process, SMTP/Submission, ...). Look on
<http://search.cpan.org/>.

What works for you depends very much on your system (Windows, Linux,
MacOS?), how you access and send mail (can you receive and send mail
locally or do you need IMAP/POP/SMTP?), your users (can you teach them
to send only plain text or do they use HTML mails? How about quoting?)


So what I basically need is a solution I can drop my conversational
agent into. Some kind of fully functional email client that already
absracts away the details of receiving and sending messages.
Generating message ids for threading. Extracting the new text which is
the response to the last email etc.

I'm not aware of an out of the box solution for this. Most of it can be
cobbled together from existing modules with a few lines of code. The
hardest part is probably "extracting the new text which is the response
to the last email" since users are notoriously bad at following
conventions in email.

I think I would use XMPP instead of mail for this. The Net::XMPP module
seems to rather easy to use (although so far I have only used it to send
messages, not to receive them) and IM fits the dialog structure better.

hp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top