'----------------------------------------------------------------------------- ' ' Using Google IMAP over port 993 (SSL) - (c) PvE - August 2018 ' ' Needs the public domain TLSE libraries: https://github.com/eduardsui/tlse ' ' Do not forget to fill in your real Google account credentials below! ' '----------------------------------------------------------------------------- INCLUDE ssl ' All requests to the IMAP server should be appended with CRNL SSL_APPEND_MARK$ = CR$ & N ' Incoming data is terminated with CRNL SSL_ENDING_MARK$ = CR$ & NL$ ' Set the timeout to 2000 msecs maximum SSL_TIMEOUT = 2000 ' Connect to server s1 = SSL_CONNECT("imap.gmail.com:993") ' Flush ssl buffer PRINT "CONNECT: ", SSL_CMD$(s1, "") ' ***** Fill in correct credentials ******** PRINT "AUTH LOGIN : " & SSL_CMD$(s1, "AUTH LOGIN username@gmail.com password") ' List mail boxes PRINT "t1 LIST " & SSL_CMD$(s1,"t1 LIST " & CHR$(34) & CHR$(34) & " " & CHR$(34) & "%" & CHR$(34)) ' Logout PRINT "LOGOUT : " & SSL_CMD$(s1,"t1 logout") ' Close SSL connection SSL_CLOSE(s1) PRINT "Closed."