Sending TEXT messages to cell phone

asmithjr

Well-Known Member
Jun 13, 2003
516
8
168
Sending TEXT messages to cell phone (SMS)

I worked a solution for a TEXT pageing program to send TEXT messages to a SPRINTPCS service.

Thought I would share it to see if there are others.

Code:
#!/bin/sh
# pager.sh
# Al Smith 08.01.2004
# SPRINT SMS paging program 
# Requires wget
# Required arguments are Company PagerNumber Message

FILE=pager.html
clear
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]
then
        echo "usage: pager.sh CO PIN your message."
        echo "   ex: pager.sh A ########## this is my message."
        exit
fi
CO=$1
PAGER=$2
MSG=`echo [email protected] |cut -d" " -f3-`
#echo $MSG

# Set up the URL for the differnt providers
SPRINT="http://messaging.sprintpcs.com/textmessaging/composeconfirm?phoneNumber=$PAGER&message=$MSG"

# Write a pager.out file and a $FILE for logging and confirmations
wget -o pager.out -O $FILE "$SPRINT"

# Here we check our Pager Company (mostly for future use)
case $CO in
    SPRINT) # search for conformation
        OK="Message Sent"
        grep "$OK" $FILE >/dev/null
        RC=$?
        case $RC in
            0 ) # Success
                echo Success
            ;;
            *) # Failure
                echo Failed
            ;;
        esac
esac
rm pager.out pager.html
#
# End
#
Lets work to provide others. Want to contibute?
 
Last edited:

Parcye

Well-Known Member
May 19, 2004
56
0
156
Eindhoven
Nice idea!

Any idea for what countries this works?

How do you use the script?

In the past many people used mtnsms.com to send sms messages, have you ever looked into that?
 

ramprage

Well-Known Member
Jul 21, 2002
651
0
166
Canada
Well my cell phone support email and has its own email address with Rogers in Canada. So I just sent a short email to my phone email address and that's it!
 

AlexF

Well-Known Member
Nov 20, 2003
148
0
166
ramprage said:
Well my cell phone support email and has its own email address with Rogers in Canada. So I just sent a short email to my phone email address and that's it!
I've also got the same thing going. As a matter of fact, SprintPCS customers have their own email address. All I do is enter my SprintPCS address under WHM/contact manager where I am using the pager as the "1" priority alert and it works without a hitch.. ;)
 

asmithjr

Well-Known Member
Jun 13, 2003
516
8
168
This particular script uses the SPRINT PCS website to send pages.

Many emails arrive entirely to late to be ov any use. that is why the script came about. Yes Sprint does the email thing and sometimes they are hours later.

The script will use their own website to send pages. It works just as if the user it typing in the message on their site. Now we all know that not all companies provide such a service but for those that do similar scripts can be written.