arjuna.tpi.emailauto.server module

class arjuna.tpi.emailauto.server.ImapServer(*, host=None, port=None, user=None, password=None, use_ssl=None)

Bases: object

IMAP Server supporting IMAP4 protocol for reading emails.

Keyword Arguments
  • host – IP or domain name of Email IMAP Server. Default is localhost. Default is configurable with emailauto.imap.host option.

  • port – Port of the IMAP Server. Default is 143 for non-SSL Mode and 993 for SSL-Mode. Default is configurable with emailauto.imap.port option.

  • user – Email address to open mailbox. Default is configurable with emailauto.user option.

  • password – Password corresponding to the email account. Default is configurable with emailauto.password option.

  • use_ssl – Should IMAPS (SSL-mode) be used? Default is True.

connect(reconnect=False)

Connect to the server and login using the provided account details.

Keyword Arguments

reconnect – If already connected, force a reconnect. Default is False.

get_mailbox(name='INBOX', *, readonly=False)

Get a MailBox object.

Parameters

name – Name of the mailbox. Default is Inbox.

Keyword Arguments

readonly – If True, messages can bot be deleted in the mailbox. Default is False.

property host

Domain/IP Address of the server.

property password

Email account password to open mailbox.

property port

Network port of the server.

quit()

Disconnect from the server and logout.

property user

Email account to open mailbox.

property uses_ssl

Does it use SSL?