Sending message to a mobile number through UNIX

Is it possible to add Pager Notification to mailx command??
Or by any other mean.

just want to specify that by Pager i mean a message to the mobile number.

Suppose i have following condition

If [[ $a -eq $b ]];then
send a message to 9999999999
else
no message to be sent
fi

Is it possible?
I have an urgent requirement for this!!

Perhaps your pager provider has an email gateway?

If not, you must set up a modem of some sort and use some kind of program that will work with it.

A more general solution is to use something like Zabbix (Homepage of Zabbix :: An Enterprise-Class Open Source Distributed Monitoring Solution)

Here's something you could try.

#!/bin/ksh
#
# Pageme (05/20/00)
# Page me with a short message
#
if [ -z "$1" ]
then
  printf "Enter Message (128 Chars Max.): "
  read message
else
  message=$*
fi
echo "$message" | mail 1234567890@carriers.smsmail.domain.xxx
echo
echo "Message Sent"

You need to know the carriers sms domain. I wrote this back in 2000. So I have no idea even where to find the sms domain. For AT&T back then it used to be: mobile.att.net

2 Likes

Please wrap code and data input/output in CODE tags, like this:-

to produce the following (fixed character width, space respected):-

This is my code

Not only does it make posts far easier to read, but CODE and ICODE sections respect multiple space and have fixed width characters, which is important for easily seeing input/output requirements.

My virtual server at work pages me every time it "reboots". My home server pages me every time my ISP changes my IP address (rare these days but used to happen a couple times a week).

Just send an email to the cell phone provider's email to sms gateway. For verizon it is @vtext.com

 
echo "I tried to call you before, but I lost my nerve." | mailx -r Tommy@tutone.net -s "Hello Jenny" 5558675309@vtext.com

Mike

1 Like

Thanks this works!!