Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 26 Feb 2013 14:12:03 +0000 (09:12 -0500)
committerKyle M Hall <kyle@bywatersolutions.com>
Sun, 14 Feb 2016 12:40:04 +0000 (12:40 +0000)
commit00c89d915b7fd72d47831d69e076e1ace1a7e78f
tree725739e59ea95b05472dc076813d52aaaeedbf5c
parentf3633586908db81bd5c6406bffaf0db03c1fbd21
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers

Nearly all cellular providers allow a person to send an text message to a cellular
phone by sending an email to phonenumber@provider. We can leverage this capability
to add the ability for Koha to send sms messages to patrons without the need to
subscribe to an sms gateway server.

Basic plan:
1. Add a table sms_providers to the db to tell Koha what service providers are available, and what domain emails should be sent to.
2. Add borrowers.sms_provider_id to tell Koha which mobile service the patron subscribes to for the number given in smsalertnumber
3. Modify Koha to send an email rather than using SMS::Send if the driver is set to 'Email'

Test plan:
0) Get a mobile phone
1) Apply the patch
2) Run updatedatabase.pl
3) Set the value of SMSSendDriver to 'Email'
4) Go to the admin page, the "Additional parameters" area should now have the link "SMS cellular providers"
5) On this page, add some providers. Make sure to add the provider for your own cellular phone service.

Here are some examples:
Sprint   phonenumber@messaging.sprintpcs.com
Verizon  phonenumber@vtext.com
T-Mobile phonenumber@tmomail.net
AT&T     phonenumber@txt.att.net

Only add the domain part in the 'domain' field. So for Verizon, that would be 'vtext.com'

6) Create an account for yourself, add your SMS number, and select your provider from the dropdown box directly below it.

7) Enable SMS messaging for Item check-in and Item checkout
8) Check out an item to yourself
9) Run process_message_queue.pl
10) Wait! You should receive a text message shortly, when I tested it, I received my sms message within the minute.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
13 files changed:
C4/Letters.pm
C4/Members.pm
Koha/SMS/Provider.pm [new file with mode: 0644]
admin/admin-home.pl
admin/sms_providers.pl [new file with mode: 0755]
installer/data/mysql/atomicupdate/bug_9021.sql [new file with mode: 0644]
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt
members/memberentry.pl
opac/opac-messaging.pl