- Timestamp:
- Dec 24, 2015, 8:14:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
foomailer/foomail.py
r400 r401 32 32 33 33 try: 34 opts, args = getopt.getopt(sys.argv[1:], "f:r:s:dp: ",35 ["from=","force","recipient=","server=","spam","port=","virus","files=","dry-run","message=","subject=","to="," cc="])34 opts, args = getopt.getopt(sys.argv[1:], "f:r:s:dp:t", 35 ["from=","force","recipient=","server=","spam","port=","virus","files=","dry-run","message=","subject=","to=","trace","cc="]) 36 36 except getopt.GetoptError: 37 37 usage() … … 41 41 virus = False 42 42 server = False 43 port = 25 43 port = "25" 44 trace = False 44 45 recipient = False 45 46 sender = False … … 63 64 elif o in ("-s", "--server"): 64 65 server = a 65 elif o in ("-p", "--port r"):66 elif o in ("-p", "--port"): 66 67 port = a 68 elif o == "--trace": 69 trace = True 67 70 elif o == "--spam": 68 71 spam = True … … 200 203 mark = time.time() 201 204 server = smtplib.SMTP(server, port) 205 server.set_debuglevel(trace) 202 206 server.helo(hostname) 203 207 server.ehlo(hostname) 204 server.set_debuglevel(0)205 208 server.sendmail(sender, recipient, email.as_string()) 206 209 server.quit()
Note:
See TracChangeset
for help on using the changeset viewer.