IMAP Library - a IMAP email testing library.
"""

from email import message_from_string
from imaplib import IMAP4, IMAP4_SSL
from re import findall
from time import sleep, time
try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen
from builtins import str as ustr
from ImapLibrary.version import get_version
import quopri

__version__ = get_version()


class ImapLibrary(object):
    """ImapLibrary is an email testing library for [http://goo.gl/lES6WM|Robot Framework].

    *Deprecated Keywords Warning*

    These keywords will be removed in the future 3 to 5 releases.
    | *Deprecated Keyword*  | *Alternative Keyword*     |
    | `Open Link From Mail` | `Open Link From Email`    |
    | `Mark As Read`        | `Mark All Emails As Read` |
    | `Wait For Mail`       | `Wait For Email`          |

    Example:
    | `Open Mailbox`   | host=imap.domain.com   | [email protected]        | password=secret |
"""
IMAP Library - a IMAP email testing library.
"""

from email import message_from_string
from imaplib import IMAP4, IMAP4_SSL
from re import findall
from time import sleep, time
try:
    from urllib.request import urlopen
except ImportError:
    from urllib2 import urlopen
from builtins import str as ustr
from ImapLibrary.version import get_version

__version__ = get_version()


class ImapLibrary(object):
    """ImapLibrary is an email testing library for [http://goo.gl/lES6WM|Robot Framework].

    *Deprecated Keywords Warning*

    These keywords will be removed in the future 3 to 5 releases.
    | *Deprecated Keyword*  | *Alternative Keyword*     |
    | `Open Link From Mail` | `Open Link From Email`    |
    | `Mark As Read`        | `Mark All Emails As Read` |
    | `Wait For Mail`       | `Wait For Email`          |

    Example:
    | `Open Mailbox`   | host=imap.domain.com   | [email protected]        | password=secret |