Created
September 13, 2012 10:47
-
-
Save tokune/3713532 to your computer and use it in GitHub Desktop.
email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#-*-coding:utf-8-*- | |
import os | |
import codecs | |
import itertools | |
import time | |
def main(template = 'template.html'): | |
i = 0 | |
for root, dirs, files in os.walk('college-/'): | |
if i%10 == 0: | |
time.sleep(10) | |
for name in files: | |
if name.endswith('.jpg'): | |
source = os.path.join(root, name) | |
cmd = 'mutt -s \'大学\' [email protected] -a '+source+' < .' | |
print cmd | |
result=os.system(cmd) | |
i+=1 | |
print '发送邮件编号:'+str(i) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment