modules.dhbw.zimbra.ZimbraHandler
- class modules.dhbw.zimbra.ZimbraHandler[source]
Bases:
ImporterSession
Handler for interacting with zimbra.
- urlstr
the given url for zimbra
- accountnamestr
the dhbw mail account
- contactsList[Dict[str, str]]
a list representing all contacts from zimbra
- realnamestr
the real name of the logged in user
- signaturesList[str]
a list of all available signatures to the user
- login(self): None
creates a session for the user
- logout(self): None
sends a logout request
- scrape(self): None
scrape the wanted data from the website
- get_contacts(self): None
import contacts from the default “contact” book
- new_contact(self, contact_dict): None
create a new contact inside the default contact book
- remove_contact(self, contact_id): None
remove an existing contact from the default contact book
- _create_entities_list(self, recipients, rec_cc, rec_bcc): List[Dict[str, str]]
create a list with dictionary elements
- _generate_mail(self, mail_dict): Dict[str, Any]
build the mail in the needed format for zimbra
- send_mail(self, mail_dict): None
sends a mail to the soap backend of zimbra
Methods
method to drop an header
Import contacts from the default contact book.
Authenticate the user against zimbra.
sends a logout request
Create a new contact inside the default contact book.
remove an existing contact from the default contact book
Scrape the selected data from zimbra.
Sends a mail to the soap backend of zimbra.
Attributes
accountname
contacts
realname
signatures
auth_token
email
headers
scraped_data
url
- drop_header(header) None
method to drop an header
- header: str
the name of the header which should be dropped
None
- async login(username, password)[source]
Authenticate the user against zimbra.
- username: str
the username for the authentication process
- password: str
the password for the authentication process
ZimbraHandler
- new_contact(contact_dict)[source]
Create a new contact inside the default contact book.
contact_dict : Dict
None