Don Read wrote:
> 
> On 13-Jul-01 Jeff Hill wrote:
> > Don Read wrote:
> >> On 13-Jul-01 Jeff Hill wrote:
> >> > Don Read wrote:
> >> >> On 13-Jul-01 Jeff Hill wrote:
> >> >> > I've tried everything I can to pipe a string with mime content to
> >> >> > metamail, but it fails in every variation of:

>--<snip>---<

> ok, i was thinking system(), but was on the fpassthru page in the manual ...
> sorry.
> But looking at your while (!feof()) loop above ...
> Hey, there are limits to a shell argument length, ya know.

Actually, I truly am ignorant of the limits, but hopefully I've avoided
any disastrous outcomes in my solution.

> alternative:
> $p=popen('/usr/bin/metamail -d -q -r -w -x -y','w');
> fwrite($p, $mime_string);
> pclose($p);
> 

I tried your code above, and while it did process the mime, it didn't
return the results so that I could determine the file name. I did try
many different tacks, but nothing seemed to work -- that may of course
just be due to my limited knowledge.

After messing with this for several days, I found that metamail was a
poor choice anyway, reading that development has apparently stopped and
that it has a security hole in the current version. 

I then tried reformime, from the maildrop package. It worked better, but
I ran into the same problems trying to get it to work with PHP.

In the end, I opted to have my mail server (qmail) pipe incoming
messages to MHonArc (it does a wonderful job handling mime). MHonArc
extracts the mime and then passes the rest of the message to PHP, which
puts it into an MySQL database. This may not be an elegant solution, and
I suspect it's wasteful of resources, but my usage is only for our
internal customer support and contact management -- a hundred or so
e-mail a day.

While this took far longer than I ever expected, it is wonderful to be
able to match incoming mail against our user database (which is in
MySQL). Now a user's entire record, past e-mail, followups and the whole
thing pop-up whenever they send us a message.

Thanks for all the effort. 

Best Regards,

Jeff Hill


> Regards,
> --
> Don Read                                       [EMAIL PROTECTED]
> -- It's always darkest before the dawn. So if you are going to
>    steal the neighbor's newspaper, that's the time to do it.

-- 
------------------------------------------------------------
------  HR On-Line:  The Network for Workplace Issues ------
http://www.hronline.com - Ph:416-604-7251 - Fax:416-604-4708
------------------------------------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to