Tim Golden wrote: > SPJ wrote: >> I am trying to create new tickets in the ticketing system using >> python. When I receive new email from a particular address, I have to >> trigger the python script and parse the mail in required format. >> >> The main hurdle here is, how to invoke the script on arrival of new >> mail? I checked the outlook settings and found that it supports only >> microsoft VB script and Jscript. Is there any other way? I mean, if I >> make a daemon, how will it be notified of new mail? Is there any >> python module that does this? >> >> I am not sure if this is the right place to ask this, since it is also >> a microsoft related question. But any help is appreciated. > > Outlook does have some events in its automation interface > (which you can handle from within Python by using > win32com.client.DispatchWithEvents) but if an immediate response > weren't critical it's probably slightly easier to schedule a job > to interrogate the mailbox every so often and harvest any new > emails. Depends on your particular need. > > TJG
Best way I can think of is to get a copy of SpamBayes source code and see how it is done there. Much easier to look at something that already looks at new messages as they arrive in the Inbox than to try to figure it out. http://spambayes.sourceforge.net/windows.html -Larry -- http://mail.python.org/mailman/listinfo/python-list