IMAP Biblios
This commit is contained in:
@@ -60,21 +60,24 @@ Public Class clsEmail
|
||||
Public Function TEST_POP3_COLLECT(MYMAIL_SERVER As String, MYMAIL_PORT As Integer, MYMAIL_USER As String, MYMAIL_USER_PW As String) As Boolean
|
||||
Try
|
||||
Logger.Debug(String.Format("Working on TEST_POP3_COLLECT..."))
|
||||
Dim client As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT)
|
||||
|
||||
client.ValidateRemoteCertificate = False
|
||||
client.Connect()
|
||||
Dim oPop3Client As New Pop3Client(MYMAIL_SERVER, MYMAIL_PORT)
|
||||
Dim oLogPath = System.IO.Path.Combine(My.Application.Info.DirectoryPath, "Log\logindependentSoft.txt")
|
||||
Logger.Debug($"IsoftLog: {oLogPath}...")
|
||||
Dim oindependentLogger As New Independentsoft.Email.Logger(oLogPath)
|
||||
' oPop3Client.ValidateRemoteCertificate = False
|
||||
oPop3Client.Logger = oindependentLogger
|
||||
oPop3Client.Connect()
|
||||
Logger.Debug(String.Format("..connected!"))
|
||||
client.Login(MYMAIL_USER, MYMAIL_USER_PW)
|
||||
oPop3Client.Login(MYMAIL_USER, MYMAIL_USER_PW)
|
||||
|
||||
Dim messageInfo As MessageInfo() = client.List()
|
||||
Dim messageInfo As MessageInfo() = oPop3Client.List()
|
||||
|
||||
For i As Integer = 0 To messageInfo.Length - 1
|
||||
Dim message As Message = client.GetMessage(messageInfo(i).Index)
|
||||
MsgBox(String.Format("Message [{0}] added", message.Subject))
|
||||
Dim message As Message = oPop3Client.GetMessage(messageInfo(i).Index)
|
||||
MsgBox($"Message-subject: {message.Subject}, Message unique ID = {messageInfo(i).UniqueID} added", )
|
||||
Next
|
||||
|
||||
client.Disconnect()
|
||||
oPop3Client.Disconnect()
|
||||
MsgBox(String.Format("TEST_POP3_COLLECT finished!"))
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
|
||||
Reference in New Issue
Block a user