Slashdot Mirror


Email Notification via SMS in the US?

Joel McShiston asks: "Back in Europe I had set up a system through which urgent emails matching certain criteria were automatically forwarded upon arrival to a (free) email account which my cell phone carrier (Vodafone) provided for free with each account - {cell number}@vodafone.es. At the carrier's site I could then turn 'SMS notification of new email' on and would receive a text message telling me to check my email each time a matching email came through. I'll be soon moving to the US and would like to know whether any of you has a similar (or better) system working over there. Which kind of SMS-email 'interfacing' are you able to do on that side of the pond?"

3 of 41 comments (clear)

  1. Re:Easy if you have your own domain by gtrubetskoy · · Score: 3, Interesting
    I don't think you need a separate script to provide notification - if you just forward the e-mail to your Verizon account you will get however many first bytes of the e-mail, which is usually sufficient to figure out what it's about. You just have to make sure that the message is explicitely addressed to your vtext.net account or it might get dropped by their server. I use something like this:

    :0 c:
    * CONDITION_GOES_HERE
    $DEFAULT
    :0 Af: /var/tmp/.vtext.lck
    | formail -b -f -I "To: 7035551212@vtext.com" -I "Received"
    :0 A:
    !7035551212@vtext.com
    "CONDITION_GOES_HERE" should be a regexp that selects your message as worthy of forwarding to the phone (mine are $0.02 a piece). It looks like I also had to get rid of the "Received" header for some reason - perhaps Verizon drops messages if a count of "Received" headers exceeds a certain threshhold.

    ...and of course you'll need to replace 7035551212 with your number.

  2. If you have Cingular (tested: sun4-solaris) by orangesquid · · Score: 3, Interesting

    echo '\'$USER', "|'$HOME/.do_sms_spawn'"' > ~/.forward
    cat >~/.do_sms_spawn.in <<EOF
    #include <stdlib.h>
    #include <unistd.h>

    int main(int argc, char **argv) {
    chdir("HOME");
    execlp("BASH", "bash", "HOME/.do_sms", NULL);
    exit(1);
    }
    EOF
    sed 's/HOME/'$HOME'/g;s/BASH/'`which bash`'/g' <~/.do_sms_spawn.in >~/.do_sms_spawn.c
    cc ~/.do_sms_spawn.c -o ~/.do_sms_spawn
    cat >~/.do_sms <<EOF
    #!/bin/bash
    do=0 #0=email,1=SMS
    part=0 #0=headers,1=body,2=tagline
    msg=
    debug=n
    exec >/dev/null 2>&1
    debuglog=$HOME/sms-debug.log
    while : ; do
    read line || break
    if [ "$debug" = "y" ] ; then echo $part$do $line >$debuglog ; fi
    if [ $part -eq 0 -a "$line" = "" ] ; then
    part=1
    elif [ $part -eq 0 -a "$(echo $line|cut -c1-4)" = "To: " ] ; then
    echo "$line" | fgrep "+sms@" >/dev/null 2>&1 && do=1
    elif [ $part -eq 0 -a "$(echo $line|cut -c1-6)" = "From: " ] ; then
    msg=$(echo $line|cut -c7-|cut -d\< -f2|cut -d\> -f1)
    elif [ $part -eq 1 -a "$(echo $line|cut -c1-2)" = "--" ] ; then
    part=2
    elif [ $part -eq 1 -a $do -eq 1 ] ; then
    msg="$msg $line"
    fi
    done
    if [ $do -eq 1 ] ; then
    msg=$(echo $msg|cut -c 1-160)
    msg=$(echo -n "$msg" | od -t xC | cut -c8- | sed 's/ /%/g' | tr -d '\n')
    if [ "$debug" = "y" ] ; then echo msg: $msg >$debuglog ; fi
    s='http://208.62.68.135/msgresult.shtml?min='`cat ~/.cellno`'&msg='
    wget -q "$s$msg" -O /dev/null 2>&1
    fi

    EOF
    chmod 700 ~/.do_sms
    um=`umask`
    umask 077
    echo XXXXXXXXXX > ~/.cellno
    umask $um
    mail Hi there. | $USER'+sms@'$HOST

    --
    --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
  3. I do it via the web by harlows_monkeys · · Score: 2, Interesting
    Both my previous cellular provider (AT&T) had and my current provider (Sprint) has a web page that anyone can go to and fill out a form to send a text message to one of their phones, given the phone number.

    So I simply went to that page, examined the form to see how it worked, and then wrote a simple little Perl script to do the same thing.

    I can then invoke that Perl script from procmail to send me notices when I receive email I'm particularly interested in.