[plug] SMS gateways?

Shayne O'Neill shayne at guild.murdoch.edu.au
Thu Jul 21 12:33:16 WST 2005


I use messagenet.

Heres a script I wrote;-

#!/usr/bin/python

import os,sys
from sys import stdin, stdout, stderr
import re
import smtplib
import string
#input = stdin.read()

def sendmessage(fromaddr,toaddr,subject,message):
        server=smtplib.SMTP('localhost')
        server.sendmail(fromaddr,toaddr,"SUBJECT: "+subject+"\n\n"+message)
        server.quit()

print "SMS Messaging Util."
print "Message:"
msg = stdin.readline()
print "Number:"
number = stdin.readline().rstrip()+"@messagenet.com.au"
subject = "<password goes here>"
print "Sending"

sendmessage ('sms at yourhostgoeshere',number,subject,msg)


--
Freedom's just another word for something new to regulate

On Thu, 21 Jul 2005, Andrew Furey wrote:

> Hi folks,
>
> What do you generally use for sending scriptable SMSs (ideally a web
> gateway)? I'm looking at it for Nagios outage notifications (I can
> write the wrapper script side of it easily enough).
>
> Thanks,
> Andrew
>
> --
> Linux supports the notion of a command line or a shell for the same
> reason that only children read books with only pictures in them.
> Language, be it English or something else, is the only tool flexible
> enough to accomplish a sufficiently broad range of tasks.
>                           -- Bill Garrett
> _______________________________________________
> PLUG discussion list: plug at plug.org.au
> http://www.plug.org.au/mailman/listinfo/plug
> Committee e-mail: committee at plug.linux.org.au
>



More information about the plug mailing list