Hylafax, send a fax from the command line

2898

In these days I’m stressing hylafax a lot, I think it’s a nice and powerful program, stable, complete and reliable. When my job will be completed I’ll publish some thoughts about it.

Server part is so stable and secure, client part, expecially for Windows clients have some lacks, there’re a lot of win client all around but every software I’ve tried has some lacks so as a lot of you I’ve decided to write my own.

Few of them have everything I need, except the license and price, I mean I think it’s right to charge for your work but while talking about an high ranking opensource software I was thinking it has good opensource clients as well.

No matter I’m deploying a base installation with a lot of different clients so I think I’ll buy some commercial clients suitable for my needs (I was really impressed about ifax.com HylaFSP client) but by the way I think I’ll deploy even few clients maded by me, I’m in an Active Directory network and few considerations and limitations about existing open source clients made me take the decision of writing some clients on my own.

Now let’s start with the basics, you’ve started reading this article for getting information about sending faxes from command line, don’t you ?

While deploying my new client I’ve read about how to send something from command line, this solution will be integrated in my new client. First you need to install command line hylafax-client, check out your favorite distro, most of them have a package called “hylafax-client” (Gentoo, Debian based and others), if don’t have it take a log at a command called sendfax, your distro should have it somewhere.

here’s the command:

sendfax -f ”
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
” -R -r “Fax Subject” -c “Coverpage comments” -x “Your recipient” -d “Recipient@1234567890” sendfax.example.document.ps

First you need to create your example document in PostScript format, if you’ve installed hylafax you’ll have ps2xx utilities (ps2pdf, ps2ascii, ps2txt, pdf2ps, …), use them to convert from your current format to Postscript if you don’t have a PS ready document (dummy example: pdf2ps input.pdf output.ps)

then modify parameters according to your email address if you want to receive notification about the job status (failed, success), fax subject, coverpage comments if you’ve it and so on, obviously change 1234567890 with your destination fax number.

Pretty easy, isn’t it ?

That’s why I’m writing my own windows and linux wrapper, backend sendfax program is so easy to use so I just need few changes for adapting my AD integration

 

Let me know your thoughts

Ben