chickadee » smsmatrix » send-fax

(send-fax RECIPIENTS FILENAME [username: USERNAME] [password: PASSWORD] [group: GROUP?] [error-on-failure ERROR?])procedure

Send the file indicated by FILENAME as a fax-message to RECIPIENTS, which is either a string or a list of strings identifying the recipients. These can be either phone numbers or a group name. If it's a group, GROUP? should be #t, otherwise it should be #f (the default). Groups can be defined in the SMSMatrix user interface on their site.

The file types accepted by SMSMatrix are listed on their site. At the time of writing this includes PDF, most common image formats and several office file formats.

If ERROR? is #t (the default) this procedure will raise an error on the first number that failed. Be careful, however, this will currently just throw one error even if multiple phone numbers failed (there can also be different reasons for failure). If it is #f, you will just get a list of result alists which you will need to check for errors yourself.

The result of this call is a list of alists. Each alist represents one message sent, and includes the following keys:

pin
The phone number of this record (a string)
id
The internal ID (an opaque hash code as a string) assigned to this message. You can use this to request more information with message-status or to look up the message in the CSV report.
timestamp
A number which is the UNIX timestamp at which time the message was delivered.
statuscode
A status code (number) indicating the delivery status of this record.
statustxt
A string containing the delivery status message.

Warning: The fax API is undocumented save for one Perl example. It is also officially unsupported by SMSmatrix at the time of writing. The procedure has been tested and returned the same error as the Perl example did, so it should most likely work, but nothing is guaranteed.