Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Expect Script to Send SNPP Text Messages. - Other Code Bank


Expect Script to Send SNPP Text Messages.
This Expect script will accept two args - cell phone number and message and can be used in other scripts for notification or to blast messages. Must have a linux os with expect installed. Read comments to find SNPP server list.
                


##########################################################################
#Expect script --  Text Messager -- by websniper
#written Aug23, 2008 for use with SNPP. All major carriers
#for cell phone service are listed with their messaging server
#names at this site. http://www.notepage.net/snpp.htm
#Must have expect installed to play this script.
#
##########################################################################

#!/usr/bin/expect --

set pagernumber [lrange $argv 0 0] 
set message [lrange $argv 1 1] 


log_user 0
set timeout 10
spawn  /bin/bash
expect -re "\]#"
send -- "telnet snpp.alltel.net 444\r"
expect  "Ready"
#puts "$pagernumber $message"

send -- "page $pagernumber\r"
expect  "Accepted"
send -- "mess '$message'\r"
expect  "OK"
send -- "send\r"
expect  "OK"
send -- "quit\r"
puts "Completed -- Your Message Has Been Sent\r"
puts "Thank You\r"
puts "\r"

#puts $igot
            
Comments
Sorry but there are no comments to display