Thread: SMS Server
View Single Post
Old 04-09-2007, 09:53 PM   #11 (permalink)
Ipp
Administrator
 
Ipp's Avatar
 
Join Date: Feb 2007
Location: Maryland
Posts: 2,064
Credits: 1,388
Send a message via AIM to Ipp Send a message via MSN to Ipp Send a message via Skype™ to Ipp
Default

I'll start you off, its up to you to finish it:

Code:
import sys, smtplib
    
#get info
from = raw_input("From: ")
to  = string.splitfields(raw_input("To: "), ',')
print "Enter message, end with ^D:"
msg = ''
while 1:
    line = sys.stdin.readline()
    if not line:
        break
    msg = msg + line
#send
server = smtplib.SMTP('localhost')
server.sendmail(from, to, msg)
server.quit()
Ipp is offline   Reply With Quote