Jump to content

Incoming Email with POP3


=sinister=
 Share

Recommended Posts

Ok well I got the pop3 connections working!! Yay finally (not with gmail though) anyways I need help getting the first incoming email. Heres what I got so far:

#include <array.au3>
#include <pop3.au3>

Global $MyPopServer = "mail.***.com"
Global $MyLogin = "****"
Global $MyPasswd = "***"

_pop3Connect($MyPopServer, $MyLogin, $MyPasswd)
If @error Then
MsgBox(0, "Error", "Unable to connect to " & $MyPopServer & @CR & @error)
Exit
Else
ConsoleWrite("Connected to server pop3 " & $MyPopServer & @CR)
EndIf
Local $uidlP = _NumberOfMessages()
While 1
Sleep(100)
Local $uidl = _NumberOfMessages()
If $uidlP <> $uidl Then
MsgBox(0, "test", "New message")
EndIf
WEnd
Func _NumberOfMessages()
Local $Messages = _Pop3Uidl()
If Not @Error Then
$Return = UBound($Messages) -1
Else
;@Error
EndIf
Return $Return
EndFunc

The other pop3 functions can be found here:

http://www.autoitscript.com/forum/index.ph...838&hl=pop3

I would really appreciate help, alot.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...