Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Simple imap wrapper.
.. image:: https://img.shields.io/pypi/v/easyimap.svg :target: https://pypi.python.org/pypi/easyimap/ :alt: Latest Version .. image:: https://img.shields.io/pypi/pyversions/easyimap.svg :target: https://pypi.python.org/pypi/easyimap/ :alt: Supported Python versions .. image:: https://img.shields.io/pypi/l/easyimap.svg :target: https://pypi.python.org/pypi/easyimap/ :alt: License
connect function create IMAP4_SSL instance by default::
>>> import easyimap
>>> host = "imap.gmail.com"
>>> user = "me@example.com"
>>> password = "hogehogehogehoge"
>>> mailbox = "secret"
>>> imapper = easyimap.connect(host, user, password, mailbox)
connect function also create IMAP4 instance by passing ssl argument::
>>> import easyimap
>>> host = "imap.gmail.com"
>>> user = "me@example.com"
>>> password = "hogehogehogehoge"
>>> mailbox = "secret"
>>> imapper = easyimap.connect(host, user, password, mailbox, ssl=False, port=143)
This imapper can list up latest n mail by listup method.
By default, This invoke fetch
from IMAP4_SSL instance with '(UID RFC822)'.::
>>> mail1, mail2 = imapper.listup(2)
>>> mail1.uid
80
>>> mail1
<easyimap.easyimap.MailObj object at 0x...>
>>> type(mail1.body)
<type 'unicode'>
>>> type(mail1.title)
<type 'unicode'>
>>> type(mail1.date)
<type 'unicode'>
>>> type(mail1.sender)
<type 'unicode'>
You can check latest unseen mail by unseen method::
>>> imapper.unseen(2)
[(82, <easyimap.easyimap.MailObj object at 0x...>), (81, <easyimap.easyimap.MailObj object at 0x...)]
You can directly fetch email object with specific id::
>>> imapper.mail(80)
<easyimap.easyimap.MailObj object at 0x...>
You can download attachments::
>>> imapper.mail(80)
>>> (id, mail) = imapper.mail(80)
>>> for attachment in mail.attachment:
>>> print attachment[0], attachment[1]
Finally, call quit method::
>>> imapper.quit()
read_only=True
argument.
| kwargs are read from Imapper's constructor. Plz read source code.Imapper ^^^^^^^
MailObject ^^^^^^^^^^
uid Returns UID(type: int).
raw if you fetched email with include_raw option, this returns raw Data::
>>> [(id1, mail1), (id2, mail2)] = imapper.listup(2, include_raw)
>>> data = mail1.raw
title Returns string of 'Subject' header.
sender Returns string of 'Sender' header.
from_addr Returns string of 'From' header.
to Returns string of 'To' header.
date Returns string of 'Date' header.
body Returns string of Body.
content_type Returns string of 'Content-Type' header.
content_transfer_encoding Returns string of 'Content-Transfer-Encoding' header.
references Returns string of 'References' header.
in_reply_to Returns string of 'In-Reply-To' header.
reply_to Returns string of 'Reply-To' header.
return_path Returns string of 'Return-Path' header.
mime_version Returns string of 'MIME-Version' header.
message_id Returns string of 'Message-ID' header.
attachments Returns list of tuples('attached file name', MailObj).
Recent Change
- 0.6.3
+ Add support for python-3.5.
+ Fixed a bug in decoding an attached plain text.
- 0.6.2
+ Fixed a bug in header/body encoding
- 0.6.1
+ Fixed a bug in _decode_header function
- 0.6.0
+ Add support for Python-3.4.
+ **Backward incompatible changes**
* Modify `listup` to return list of mailobj.
* Rename many properties to underbar separated format.
FAQs
Simple imap wrapper.
We found that easyimap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.