def connectToServers(self, profile): recv = profile['config']['receiver']['protocol'] send = profile['config']['sender']['protocol'] if recv == "POP3": self.mailbox = MailboxPOP3(profile) elif recv == "IMAP": self.mailbox = MailboxIMAP(profile) if send == "SMTP": self.sendbox = SendboxSMTP(profile)