0.1.1 • Published 6 years ago

hylafax-clip v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

node-hylafax-clip

Hylafax client module with Promise interface

based on work of Dan Jenkins dan.jenkins@holidayextras.com (www.dan-jenkins.co.uk)

and module git://github.com/danjenkins/node-ftp.git

Installing

npm install hylafax-clip

Usage

var Hylafax = require('hylafax-clip');
var fs = require('fs');

var faxfile = 'path_to_my_FAX.pdf';
var faxnum = '++phone_number+++';


var options =
{
	host: 'myserver'
	,port: 4559
	,username: 'myusr'
	,password: 'mypwd'
};

var hylafax = new Hylafax( options );


hylafax.connect().then( function()
{
	console.log('Connected');
})
.then( function()
{
	return hylafax.sendFax( { number: faxnum }, fs.createReadStream( faxfile ));
})
.then( function( data )
{
	hylafax.disconnect();
},
function( err )
{
	console.log( 'Error occurred: %s', err );
	hylafax.disconnect();
});

options

The options to sendFax are the following:

OptionDescriptionDefault Value
userUsername of the client'NodeJS Hylafax Client'
dial_attemptsThe maximum number of times to dial the phone3
triesThe maximum number of times to retry sending a job once connection is established3
notification_addressemail adress where to send notificationsroot@localhost
notifyControls the email notification messages from the server. Possible values: "none" - notify if error only, "done" - notify when done, "requeue" - notify if job is re-queued, "done+requeue"none
informationclient job tag'Hylafax Client Information'
last_timeKill the job if not successfully sent after this much time in 'DDHHSS' format'000259' (three hours)
scheduled_priorityThe scheduling priority to assign to the job127
vresSet the vertical resolution in lines/inch to use when transmitting facsimile. High resolution equals to "196", low resolution equals to "98"196
page_widthSet the transmitted page width in millimeters209
page_lengthSet the transmitted page length in millimeters296
0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

9 years ago

0.0.1

9 years ago