I wanted to integrate the fax function on a HP MFP that we bought with php app developed in house.
However, I found that the fax utility, hp-sendfax, although allowing command line options, works if I run from out Ubuntu server desktop, it refused to work when I tried from Sah session to our Ubuntu server from my Mac.
Is there anyone who know how to get it work in pure command line mode?
The hp-sendfax app is a python app, though I dont have the right equipment to test, it seems you want to not run in GUI_MODE (see var mode == GUI_MODE) and this does seem like it can be set from args, but bar that open the file and just before the first place where 'if mode == GUI_MODE:' occurs you set 'mode = NON_INTERACTIVE_MODE'
Hope this wors for you. Else if you do php, see what hp-sendfax does, from a quick scan it looks like it is connecting to dbus which you guys might do from php directly.