HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: [hylafax-users] question about hylafax
On Tuesday 07 Jul 2009, Xavier Cardil wrote:
> Hi, it is possible on Hylafax to send faxes on demand by analysing an
> email header and if the contents on, for example "attachments" ( a
> .pdf file ) and "subject" are the right ones, send a fax with the
> .pdf file attached on the email ?
That's really more a procmail thing than a hylafax thing.
What you want to do is use procmail to capture the message if the subject is
right; then you need a Perl, Python, PHP or Ruby script which will extract
the PDF attachment into a file, then send it as a fax. Easy enough.
First: Get the appropriate library bindings for your favourite scripting
language, to deal with multipart messages and sending faxes.
Second: Write a script which will examine a multipart message on STDIN; and
if a PDF attachment is detected, write it to a file under /tmp/.
Third: Set up a test user, with a procmail recipe that calls up your script.
Fourth: Check that e-mailing the test user with a PDF attachment actually
calls your script and creates a temporary file. When you are sure this is
working, add a line to the script that fires off the sendfax command.
Fifth: Test it some more.
Sixth: Deploy it!
--
AJS
(Originating address does not accept e-mail. Insert a figure "one" before the
at sign if replying off-list.)
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*