-   Linux - Networking (
-   -   E-Mail notification to users via SMS (gateway script ok, but notification script?!?) (

Riku2015 03-07-2002 08:03 AM

E-Mail notification to users via SMS (gateway script ok, but notification script?!?)
Hi all!

I have Linux on my server. And i want to make a e-mail notification eg. "You have new mail" to my users via GSM SMS. I have sms script what send via command line.

The problem is:
How i make some script what reads the mail file and send new mail notification to registered users own GSM phone???

Thanks all for help

Eternal 03-07-2002 11:03 AM

Inovate, Not Creat!
This is a script that does it for you,
On of the best stuff in linux is that you dont need to create sutch scripts / programms download one and work on it a few days to get the results your want.

Riku2015 03-07-2002 11:26 AM


But the problem is, that script does not work on my sms operador... :(

Eternal 03-07-2002 11:34 AM

Dam :( but are there any web based site that offer *free* sms services? in france, austria... you can go onto (whatever) and enter the telephone number ans the message and click send. If you look at the html code, ull see

form action="send.sms.php" method="POST"..
input type="num" name="number...."
input type="title" name="title..." etc..

then just call lynx as etc if not im not too shure what to do ;( maybe use an sms deamon but i really have no clue what they do ;D

Riku2015 03-07-2002 11:41 AM

ok. i see what do you mean.

I have on my site the sms send. and that works to a finnish operador :)
i only put to the script the intranet ip addres :) i going to try if work..

Riku2015 03-08-2002 07:04 AM

GREP problem
:) yes
now is work via my server.
I haved to modify the script.

But this script is no good :(

perhaps the best solution is:

the file /var/log/maillog

tail -f to the file and take (grep?!?) the <> and send via that to the USER the SMS.
off course i have to make to the website a script, who wants the sms notification :)

the problem is how i grep? i only want the part of begin>.....

i havet tried a lot of, but i feel that, grep does take a part of line?!?

Eternal 03-08-2002 07:23 AM

in PHP? ;D
#!/usr/local/bin/php -q
# An eleet Script By oliver :D (pH)
# littlescrip.php email

$RAW__EMAIL = $argv[1];
print("Hello, i am going to explode his email :D.\n");
$STAR__EMAIL = explode("@", '$RAW__EMAIL');
print("Ok, I have done it, and its $STAR__EMAIL.\n"


You could make it in BASH as you wish but if your wanting to make it web based, PHP sounded better. ITs very simple. You could add what you want in it... Just ask ;)

Eternal 03-08-2002 07:37 AM

Im bord ;(

# CREATE TABLE registered (name varchar(250), mail varchar(250));

if (!isset($mode))

<form action="$PHP_SELF?mode=register" mothode="post">
Enter Your Name <input type="text" name="name">
Enter Your E-Mail <input type="text" name="mail">



if ($mode == "register")
mysql_query("INSERT INTO registered (name,mail) VALUES ('$name','$mail')"):

if (mysql_error() == "") { echo "You are Registerd"; }

/* Thats For the simple registration */


then it talk for itself, fdopen, system, mail, and your done. (And my boss just got in i must run (; )

Riku2015 03-08-2002 09:53 AM


Im not undestand php language... :(

But i mean when to the /var/log/maillog comes new entry it sends to user sms message. (start the sending script)

Eternal 03-08-2002 10:33 AM

Well, isnt linux an oputunity to learn more? If you would know php it would be done in a few minuts.

Ok let get this sorted out now.

Get this programm or any others, seach on and
Or get this one

Rip it up, Find out how it checks for the mail, find out how and where it sends the sms and just change that function to your web based one, i really think php will do the job because you would need a sript that runs localy and another one calling the site and php does that. Its not only a Great powerfull web based language but also an exelent shell ;D

But im promoting PHP as alwas just continu as you feel everything is possible.

Riku2015 03-08-2002 11:16 AM

i have alredy findet out how pop2smswebde it works :)
i have ripped to work on my server..

The works via pop account and sends SMS via (method POST) WWW (i have changet to my server ( etc.. )

That was easy to get work, but i only want a script to run on linux shell as root or noboy using sh or bash, to spy when users get a mail, then send sms to user mobile phone.

All times are GMT -5. The time now is 10:04 AM.