Mail for Hina chan
from poplib import POP3 def biff(hostname, username, password): try: pop3 = POP3(hostname) pop3.user(username) pop3.pass_(password) mails,bytes = pop3.stat() pop3.quit() except: mails = -1 # error code return int(mails)
notes:
Hina chan wants to make auto-reply email programme.
I picked up subjects for her.
- recieve mail (poplib)
- parse mail data(mimetools, mimetype)
She told she wants her email programe to act she lives.
Well, I had small msn/irc chat bot programme before,
but, I am not sure how to computer read email ?
There are alot subjects that I did not study yet.
parse English is seem easier than parse Japaense,
(no need to care morphological parse?)
hmm, ... no idea, I will think how to make spam filter.
if mail.address in addressbook: bot.replyto(mail) if mail.is_spam: trashbox += mail