Sign in to follow this  
Followers 0
dminion

POP_ssl_V3.2_Example.au3

4 posts in this topic

#1 ·  Posted (edited)

Hey everyone, I'm having an issue with this script. It will look at the email messages in the inbox once and after that it will not see them again the next time I run it. It's like it's removing them from the inbox but when I log into the account, they're still there.

#include <Array.au3>
#include "POP_ssl_V3.2.au3"

Global $cust_username = "user_removed", $cust_password = "pass_removed"

;~ Opt("OnExitFunc", "endscript")
Opt("SendKeyDelay", 0)
Opt("TrayIconDebug", 1)

;kill previous run
While ProcessExists("openssl.exe")
    ProcessClose("cmd.exe")
    ProcessClose("openssl.exe")
WEnd

;###FILL IN THIS INFO###
$User = $cust_username
$Pass = $cust_password

;set server info
$SSL_Exe_loc = "C:\OpenSSL\bin\openssl.exe"
$POP_Server = "pop.gmail.com"
$POP_Port = "995"
$error = ""

$msg = _POP_Connect($POP_Server, $POP_Port, $SSL_Exe_loc, True)
;MsgBox(0, $msg & " - " & @error, $_POP_Log)
$error &= $msg & " - " & @error & @CRLF

If $msg == False Then EndReport($error)
$msg = _POP_Login($User, $Pass)
;MsgBox(0, $msg & " - " & @error, $_POP_Log)
$error &= $msg & " - " & @error & @CRLF

If $msg == False Then EndReport($error)
$msg = _POP_GetStats()
MsgBox(0, "", $msg)
$error &= $msg & " - " & @error & @CRLF

If $msg == False Then EndReport($error)
$msg = _POP_GetList()
_ArrayDisplay($msg)
$error &= $msg & " - " & @error & @CRLF

$msg = _POP_GetMessage(1)
_ArrayDisplay($msg)
$error &= $msg & " - " & @error & @CRLF

$msg = _POP_Disconnect()
$error &= $msg & " - " & @error & @CRLF


EndReport($error)
Func EndReport($error)
    MsgBox(0, "", $error)
    Exit
EndFunc   ;==>EndReport

Anyone have any ideas?

Thanks!

Edited by dminion

Share this post


Link to post
Share on other sites



Hey everyone, I'm having an issue with this script. It will look at the email messages in the inbox once and after that it will not see them again the next time I run it. It's like it's removing them from the inbox but when I log into the account, they're still there.

#include <Array.au3>
#include "POP_ssl_V3.2.au3"

Global $cust_username = "user_removed", $cust_password = "pass_removed"

;~ Opt("OnExitFunc", "endscript")
Opt("SendKeyDelay", 0)
Opt("TrayIconDebug", 1)

;kill previous run
While ProcessExists("openssl.exe")
    ProcessClose("cmd.exe")
    ProcessClose("openssl.exe")
WEnd

;###FILL IN THIS INFO###
$User = $cust_username
$Pass = $cust_password

;set server info
$SSL_Exe_loc = "C:\OpenSSL\bin\openssl.exe"
$POP_Server = "pop.gmail.com"
$POP_Port = "995"
$error = ""

$msg = _POP_Connect($POP_Server, $POP_Port, $SSL_Exe_loc, True)
;MsgBox(0, $msg & " - " & @error, $_POP_Log)
$error &= $msg & " - " & @error & @CRLF

If $msg == False Then EndReport($error)
$msg = _POP_Login($User, $Pass)
;MsgBox(0, $msg & " - " & @error, $_POP_Log)
$error &= $msg & " - " & @error & @CRLF

If $msg == False Then EndReport($error)
$msg = _POP_GetStats()
MsgBox(0, "", $msg)
$error &= $msg & " - " & @error & @CRLF

If $msg == False Then EndReport($error)
$msg = _POP_GetList()
_ArrayDisplay($msg)
$error &= $msg & " - " & @error & @CRLF

$msg = _POP_GetMessage(1)
_ArrayDisplay($msg)
$error &= $msg & " - " & @error & @CRLF

$msg = _POP_Disconnect()
$error &= $msg & " - " & @error & @CRLF


EndReport($error)
Func EndReport($error)
    MsgBox(0, "", $error)
    Exit
EndFunc   ;==>EndReport

Anyone have any ideas?

Thanks!

Here's an update.

If I go into gmail and set the pop settings to "Enable POP for all mail (even mail that's already been downloaded)" they all come back. But this is what I had originally set it to.

Share this post


Link to post
Share on other sites

Using this method you are able to download the new emails and then mark them as read so that the next time you run this script the read email messages will not show up again, correct?


My work in AutoIt (Not many yet):

Parse Large Text Files To 2D Array Quickly [With Chunk Size]

 

My artificial intelligence project coded entirely in AutoIt. Meet Alice Assistant: http://facebook.com/ProjectAliceAI

 

Share this post


Link to post
Share on other sites

Using this method you are able to download the new emails and then mark them as read so that the next time you run this script the read email messages will not show up again, correct?

Thanks for your reply.

I'm not sure if that's what it's supposed to do or not but when I log into gmail, it still shows them as unread.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0