I\'m currently trying to make an existing IMAP/SMTP script OAuth2-aware and after reading lot\'s of manuals and howtos I still don\'t know how to connect to an IMAP or SMTP serv