Module BoomSMS


module BoomSMS: sig .. end
Send a text message through the Boom SMS service. $Id: BoomSMS.html,v 1.1 2005/11/23 13:40:14 rich Exp $

type t 
val account : ?connection:Http_client.pipeline ->
account_id:string -> password:string -> unit -> t
Create an account object from an account ID and password. The optional ~connection parameter is a pre-existing Http_client.pipeline. If not supplied, one is created for you. Returns an account object which can be passed to BoomSMS.send. See also BoomSMS.account_from_env.
val send : t ->
?username:string ->
?mobile_to:string ->
?mobile_to_list:string list ->
?notify:bool -> ?notify_email:string -> message:string -> unit -> unit
Send an SMS message. The parameters are: t: the account ?username: optional sender informatin ?mobile_to: mobile number to send to ?mobile_to_list: if sending to multiple mobiles ?notify: enable notification (default: true) ?notify_email: override default email address ~message: message, max 160 chars
val account_from_env : ?connection:Http_client.pipeline -> unit -> t
This is a convenience function which looks for a file called $HOME/.boomsms and loads the account ID and password from it. It returns an account object which can be passed to BoomSMS.send.

The format of the file is:

 account <account_id>
 password <password>

Any blank lines or lines beginning with # are ignored.

If no file is found, raises Sys_error. If there is a problem with the file format, raises Invalid_argument.

See also BoomSMS.account.

val account_id : t -> string
val password : t -> string
val connection : t -> Http_client.pipeline
Return the account ID, password and connection from an account object.