Changeset 400
- Timestamp:
- Dec 24, 2015, 8:11:15 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
foomailer/foomail.py
r383 r400 32 32 33 33 try: 34 opts, args = getopt.getopt(sys.argv[1:], "f:r:s:d ",35 ["from=","force","recipient=","server=","spam"," virus","files=","dry-run","message=","subject=","to=","cc="])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="]) 36 36 except getopt.GetoptError: 37 37 usage() … … 41 41 virus = False 42 42 server = False 43 port = 25 43 44 recipient = False 44 45 sender = False … … 62 63 elif o in ("-s", "--server"): 63 64 server = a 65 elif o in ("-p", "--portr"): 66 port = a 64 67 elif o == "--spam": 65 68 spam = True … … 120 123 email['Cc'] = cc 121 124 email['X-Server'] = server 125 email['X-Port'] = port 122 126 email['X-Hostname'] = hostname 123 127 email['Message-ID' ] = '<' +''.join(random.sample(string.letters + … … 195 199 if not dry: 196 200 mark = time.time() 197 server = smtplib.SMTP(server )201 server = smtplib.SMTP(server, port) 198 202 server.helo(hostname) 199 203 server.ehlo(hostname)
Note:
See TracChangeset
for help on using the changeset viewer.