Sending message to a mobile number through UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sending message to a mobile number through UNIX
# 1  
Old 07-21-2014
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

Code:
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!!

Last edited by rbatte1; 07-21-2014 at 11:03 AM.. Reason: Code tags
# 2  
Old 07-21-2014
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)
# 3  
Old 07-21-2014
Here's something you could try.


Code:
#!/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
These 2 Users Gave Thanks to mph For This Post:
# 4  
Old 07-21-2014
Please wrap code and data input/output in CODE tags, like this:-
Quote:
[CODE]This is my code[/CODE]
to produce the following (fixed character width, space respected):-
Code:
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.
# 5  
Old 07-21-2014
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
Code:
 
echo "I tried to call you before, but I lost my nerve." | mailx -r Tommy@tutone.net -s "Hello Jenny" 5558675309@vtext.com

Mike

Last edited by Michael Stora; 07-21-2014 at 04:23 PM..
This User Gave Thanks to Michael Stora For This Post:
# 6  
Old 07-22-2014
Quote:
Originally Posted by mph
Here's something you could try.


Code:
#!/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
Thanks this works!!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Sending email with message body and attachment

Hello experts!! I am trying to send an email with message body and attachment.but i am getting any one like message body or attachment. I tried below command: (echo "subject:test";echo "MIME-Version: 1.0";echo "content-transfer-encoding:base 64";echo "content-type:txt;name=test.txt";cat... (2 Replies)
Discussion started by: Devipriya Ch
2 Replies

2. Shell Programming and Scripting

Message Body while sending an email

I am making use of the following code to display the results of my txt file in an email: mail -s 'Count Validation Test Comparison Results' Ronit@XYZ.com < Count_Validation_Results_`date +%m%d%Y`.txt Email Output: ----------Query 1 Count Validation Results-------- Source count is 4 Target... (7 Replies)
Discussion started by: ronitreddy
7 Replies

3. Shell Programming and Scripting

sending multiple files along with mail message using uuencode

Hi, I have a requirement to send a mail with multiple files attached to it and along with the text message in the mail. I am trying sumthing like below but it only sends me the text message and no files attached to the mail. ---------------------------------------- ( uuencode file1... (1 Reply)
Discussion started by: sachinkl
1 Replies

4. Shell Programming and Scripting

Sending email message in colour and bold letter

The code echo -e "\033[34m Test \033[0m Mail" when i execute this command line i get proper output but when i mail the output of this command through sendmail it doesn't appear. Basically I want to send email message in diffrent colours, bold letter using shell script. (2 Replies)
Discussion started by: baps
2 Replies

5. Solaris

Problem in Sending Arabic message in Unix

I have developed an application in java which sends arabic as well as english messages(SMS). First I deployed the same on windows machine and it sends the messages in both the languages. Due to some performance issue thought of migrating to UNIX. On the unix testing machine, when i tested it out,... (5 Replies)
Discussion started by: jacobkuncheria
5 Replies

6. UNIX for Dummies Questions & Answers

Sending a structure through a message queue

Hi, I browsed thru the previous posts and couldnt find a solution for my problem. Hence I decided to post it. I have a buffer array that I want to send thru a message queue. The array consists of a header structure and a payload structure memcopied to it. When I print the contents of the... (1 Reply)
Discussion started by: zeebie
1 Replies

7. Shell Programming and Scripting

Problem while sending message and attachment with mailx

Hi All, I am trying to send a mail with an attachment and message. Following command I am using. (cat <messagefile> ; uuencode <attachmentfile> <attachmentfile>)|mailx -s"Subject" dave@email.com In the received mail, message body is appearing fine. But attachment is not coming. Rather... (2 Replies)
Discussion started by: nihar.dutta
2 Replies

8. Shell Programming and Scripting

sending message to terminal

hi all i have script #!/bin/bash cd /usr3/prod grep ERROR /usr3/prod/ind.log > /usr3/prod/ind_err.log if test -s /usr3/prod/ind_err.log then echo "error during process" else echo "process succeed" fi i want that this message(echo) will be display one time at the top of the screen... (5 Replies)
Discussion started by: naamas03
5 Replies

9. Cybersecurity

Sending a message to a user when password will be expired

Hi, Does anyone have a script (for AIX) that sends a message to a user that his password will be expired within 5 days for ex. Thanks (1 Reply)
Discussion started by: Diederd
1 Replies
Login or Register to Ask a Question