def get_connection(self):
if not self.uri:<EOL><INDENT>return None<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = ImapTransport(<EOL>self.location,<EOL>port=self.port if self.port else None,<EOL>ssl=self.use_ssl,<EOL>tls=self.use_tls,<EOL>archive=self.archive,<EOL>folder=self.folder<EOL>)<EOL>conn.connect(self.username, self.password)<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = GmailImapTransport(<EOL>self.location,<EOL>port=self.port if self.port else None,<EOL>ssl=True,<EOL>archive=self.archive<EOL>)<EOL>conn.connect(self.username, self.password)<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = Pop3Transport(<EOL>self.location,<EOL>port=self.port if self.port else None,<EOL>ssl=self.use_ssl<EOL>)<EOL>conn.connect(self.username, self.password)<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = MaildirTransport(self.location)<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = MboxTransport(self.location)<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = BabylTransport(self.location)<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = MHTransport(self.location)<EOL><DEDENT>elif self.type == '<STR_LIT>':<EOL><INDENT>conn = MMDFTransport(self.location)<EOL><DEDENT>return conn<EOL>
Returns the transport instance for this mailbox.

        These will always be instances of
        `django_mailbox.transports.base.EmailTransport`.