mailparse

1086671460000

mailparse is a PHP extension that can be used to decode MIME mail messages. Though there are several open source classes that provide this fucntionality, mailparse is special because by virtue of being an extension it has an advantage when it comes to speed.

In fact my first got to know about the existence of this extension only when I was reading through the Mail_mimeDecode class by Richard Heyes. I decided to give try out mail parse instead of using PEAR. In order to install mailparse you need to download the tarbal from http://pecl.php.net/package/mailparse and expand it inside your php source tree.

If you have not compiled mbstring (multi byte string) support into your PHP installation you need to enable it by recompiling with --enable-mbstring. (tip: you can alwasy find out your last configuration directive inside the config.status file you don't always have to call phpinfo(). Indeed on production servers you shouldn't keep anything named phpinfo.php lying about.

Inside the ext/mailparse folder you need to run phpize followed by ./configure, make and make install. Once you restart apache you will find that mailparse support is now built into your system.

comments powered by Disqus