Kudos for writing these (though it's a while back, they're still good!). But I'm a bit unsure how the first two are intended to work together to do basic pop via ssl.
I have a request, could someone here add a /really/ basic simple example script showing their use.
So for example:
Log onto gmail pop3; loop (collect an email/ConsoleWrite it/delete from server); close connection
I'm trying to work out their use but without an example (even "bare bones" with hard coded account/pw/server/port) it's tricky.
Ah, seems to be semi-working, I have some kind of SSL lock.
Whats happened...
1st run worked fine
2nd run onwards it seems the process hasn't released all the resources/hooks/whatevers it should have, because Outlook POP3 isn't working, and I'm getting what someone else reported of "only 1/2 the text appearing in the trace window.
Could you post what you have then? I've been unsuccessful at using those scripts to download mail from gmail.
Edit: POP_ssl_V2.au3 seems to get stuck on Line 119: Sleep(50)
I don't "have" anything.. it worked for me to a point enough to prove the concept but not fully. Testing if I can do more..... may be able to, may not.
Update - I've managed to get it (somewhat) to work for me... I'm going to try and shuffle around some of mikeytown's code into a format that's more directly usable than the proof of concept.
If I get to the point that gmail etc work reasonably for me, I'll post up the code so others can take it further and maybe merge it into the main POP3 UDF.
I've got Mikeytown's gmail pop3 working mostly, but also, I have switched from openssl.org to the cygwin version.
Mikeytown's script noted that the first input was not accepted other than from the keyboard. I referred to this post: http://www.autoitscript.com/forum/index.ph...st&p=161734 which says this is a bug in that compilation of openssl and if needed use cygwin's compilation of openssl instead. I modified the code on that page to use pop3 instead of smtp, which was surprisingly easy.
How to do it: You will need the cygwin DLL files which can be downloaded from their website and then unzipped. The above post doesn't tell you completely; this is what I found out:
You want to get hold of the /bin folder from cygwin (containing openssl.exe, cygssl-0.9.8.dll, cygcrypto-0.9.8.dll, c_rehash). You dont need to install them - download and unzip the openssl part of cygwin. You will also need to find somewhere the file cygwin1.dll (google and download) and put that in the same folder if not included (openssl.exe uses this).
Then grab the AutoIt code for cygwin SMTP from the above post, and modify it to start:
Plain Text
$EmailUsername = "myemail" ;if your email is myemail@gmail.com, use "myemail"
$EmailPassword = "mypassword"; enter your password
$SmtpServer = "pop.gmail.com"
$SmtpPort = "995"
; Must use Cygwin OpenSSL in order to implement stdin automation; the Windows build has a bug which makes StdinWrite() fail.
$OpensslPath = '"' & @ScriptDir & '\openssl.exe" s_client -quiet -connect ' & $SmtpServer & ':' & $SmtpPort
$WorkingDir = @ScriptDir
Dim $Conditions[9], $Actions[9]
$Conditions[0] = '+OK'
$Actions[0] = "USER " & $EmailUsername
$Conditions[1] = '+OK'
$Actions[1] = "PASS " & $EmailPassword
$Conditions[2] = '+OK'
$Actions[2] = "STAT"
$Conditions[3] = '+OK'
$Actions[3] = "RETR 1"
$Conditions[4] = '.'
$Actions[4] = "QUIT"
I'm working on it and plan to get it a little better for UDF style usage. For example it does not retrieve the whole message, nor check for buffer being empty before issuing the next command. I'll see what I can do, but figured others might like this alternative code