Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import sys
- import subprocess
- def system(cmd):
- subprocess.call(cmd, shell=True)
- if len(sys.argv) < 3:
- sys.exit ("Usage: "+sys.argv[0]+" <subject> <number>")
- sub = sys.argv[1]
- num = sys.argv[2]
- msg = raw_input ("Message: ")
- file = open("/root/msg.txt", "w")
- file.write(""+msg+"")
- file.close()
- system ("mail -s \""+sub+"\" "+num+"@txt.att.net < /root/msg.txt")
Advertisement
Add Comment
Please, Sign In to add comment