- Timestamp:
- Sep 22, 2010, 5:36:11 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
foomailer/foomail.py
r2 r183 113 113 114 114 email = MIMEMultipart() 115 hostname = socket.gethostname() 115 116 116 117 email['From'] = 'Testing sender <' + sender + '>' … … 119 120 email['Cc'] = cc 120 121 email['X-Server'] = server 121 email['X-Hostname'] = socket.gethostname()122 email['X-Hostname'] = hostname 122 123 email['Message-ID' ] = '<' +''.join(random.sample(string.letters + 123 124 string.digits,10)) + '@' + email['X-Hostname'] + '>' … … 192 193 mark = time.time() 193 194 server = smtplib.SMTP(server) 194 server.set_debuglevel(0) 195 server.helo(hostname) 196 server.ehlo(hostname) 197 server.set_debuglevel(1) 195 198 server.sendmail(sender, recipient, email.as_string()) 196 199 server.quit()
Note:
See TracChangeset
for help on using the changeset viewer.