0 purchases
postcard 0.3.2
Postcard
POP3/IMAP/SMTP client and more!
Thanks for use.
How to use
POP3
For decorator
from postcard import Pop3
pop = Pop3()
@pop.process(user="xxx", pwd="xxx")
def get_content():
content = pop.retrieve()["content"]
print(content)
For usual
from postcard import Pop3
pop = Pop3()
pop.login(user="xxx", pwd="xxx")
...
pop.close()
SMTP
from postcard import Smtp
smtp = Smtp()
@smtp.process(user="xxx", pwd="xxx")
def send():
ret = smtp.send_mail(subject="xx", content="xx", receiver="xx")
print(ret)
IMAP
from postcard import Imap
imap = Imap()
@imap.process(user="xxx", pwd="xxx")
def get_content():
content = imap.retrieve()["content"] # If you want to mark as read, please set readonly to False.
print(content)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.