From a23563fe1dccdfa2b79280c2fae6b238550b9f92 Mon Sep 17 00:00:00 2001 From: Jan Willamowius Date: Tue, 13 Sep 2005 15:43:35 +0000 Subject: [PATCH] Verizon SMS Gateway (non-email-based) --- src/lib/Spong/Message/plugins/msg_verizon | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/lib/Spong/Message/plugins/msg_verizon diff --git a/src/lib/Spong/Message/plugins/msg_verizon b/src/lib/Spong/Message/plugins/msg_verizon new file mode 100644 index 0000000..37b7a55 --- /dev/null +++ b/src/lib/Spong/Message/plugins/msg_verizon @@ -0,0 +1,28 @@ +# Messaging function for Teletouch pagers using e-mail delivery via +# the e-mail status function + +$MSGFUNCS{'verizon'} = \&msg_verizon; + +sub msg_verizon { + my ($pager,$subject,$body) = @_; + + &verizon_page($pager,$subject,$body); + &debug( "verizon page sent to $pager" ); +} + +sub verizon_page { + my ($recipient,$subject,$body) = @_; + # Code here to post info to Verizon web form + use LWP::UserAgent; + $ua = new LWP::UserAgent; + $ua->agent("Spong Verizon Gateway/0.1 " . $ua->agent); + + my $req = new HTTP::Request POST => 'http://www.msg.myvzw.com/results.jsp'; + $req->content_type('application/x-www-form-urlencoded'); + $req->content("min=$recipient&showDisclaimer=n&Send.x=yes&sendername=spong&message=$body"); + my $res = $ua->request($req); +} + +# Required becuase I'm included perl code +1; + -- 2.30.2