tags:

views:

1557

answers:

4

Hi all.

I have one interesting problem.

I must parse mail body (regular expression), get some data from mail body, put this data to mail subject and forward this mail to another address. This must be done immediately when mail is received.

Is any free WEBMAIL client that allow writing custom filter, or I must make application for this simple task?

Which is best open source mail client (PHP or ASP.NET)?

+1  A: 

To get immediate processing of mails without polling, this should be integrated into your mail delivery process (MDA, Mail Delivery Agent). On most Unix boxes, this can be easily done via procmail and formail (part of procmail).

If you have more control over your mailer, tighter integration might be possible for more performance || better error handling.

David Schmitt
+1  A: 

I don't know any freemailer where you could run such highly customized filters.

Please specify 'open source mail client', as your question doesn't show any need for a webmail-interface.

As a possible solution you could write a small script that a) collects the mails every x minutes (cronjob) and b) applies your filter. This works at a lot of free php webhosters, there are also some free cronjob-services (first google hit) which can call your script every x minutes.

Zend_Mail and maybe PHPMailer are nice mail-libraries.

Karsten
A: 

Look at Bugtracker.net they implement a pop3 client which can receive and process incoming emails (which in their case are stored as bug cases) to process the mail content they use SharpMime.

Cohen
+1  A: 

I use this one to parse bounce emails

http://pear.php.net/package/Mail_Mime

good results so far.

EDIT:

also http://www.xpertmailer.com/ has a very nice MIME library that can help you.

Gabriel Sosa