Skip to main content

A POP3/IMAP/SMTP client.

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postcard-0.3.2.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

postcard-0.3.2-py3-none-any.whl (8.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page