mhonarc-users

Using process_input

2000-11-26 05:07:54
MHonArc Users,

I have been using MHonArc to process files inside of our applcation for
a little over a year now, but I resently wanted to change how the
processing was done and started running into some areas that confused
me.

Presently I use this:
        my $message = qx!/usr/bin/mhonarc -single -outdir=$out_dir
$filename!;
        return ($message);

This is working fine, but now I need to have variables from my main
scripts available inside of MHonArc so I can process the files one time
only.

After looking through the archives I found information about the
process_input function and tried to implement using it.  It appears that
it defaults the output to STDOUT (direct to browser).

Here is what I know so far:
The mhexternal.pl file is where I can handle the custom processing of
the each file as it is created.
I could pass more options, but I would rather not hack the mhonarc code
to much if possible.
The variables I need are available when using the process_input method,
but the output is sent deirectly to the browser instead of being
controled by the Apache::ASP module.

Here is what I want to do:
I read the messages in from their POP3 account
Parse the message with mhonarc
During the parsing -
    save all attachments to the users online folders.
    Change the link at the bottom of the email to retrieve the file from
the online folder

In order to do that I have to know some variables from inside of the
main Perl application.  Using the qx function the variables are not
available since it launches a seperate compiler.  I have done some
simple tests with the process_input function, but the results are sent
to the browser instead of stored in a variable.

What I am missing?

(this is all on Linux with Apache/mod_perl)

Aaron

<Prev in Thread] Current Thread [Next in Thread>