简体   繁体   中英

How do I receive mail using Python?

I am trying to make a program on my computer at home that will constantly check a certain gmail address; The purpose being the only email this address receives is from me.

I would just like to be able to

  1. Check for mail
  2. Download mail (presumably to a string, though a file is acceptable), and
  3. Delete the mail from the web server but keep it on my computer.

That is all I need to know right now, however my long term goal is to set up kind of a remote terminal over email, so that wherever I have email I have a certain amount of control over my computer.

As Gabi points out, you should check out libgmail . You might also want to check out twisted python . They have some powerful modules for SMTP, POP3, IMAP, and many more that have nothing to do with email.

如果您想编写一个程序来处理传入的电子邮件,请查看Pythomnic框架: http ://www.pythomnic3k.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM