I have a VB.net windows app which streams through emails from a givena mailbox and saves the data into the DB.
We are now in the process of changing the mail setup, I mean from Pop3 to Exchange mailbox.
I dont know whether this change will have an impact on the attached code, please can someone have a look and advice?
Any help/advise/suggestion is greatly appreciated.
Thanks in advance.
Dim POPClient As Pop3.Pop3MimeClient
Dim OrderID As Integer
Dim MailServer As String = My.Settings("MailServer")
Dim EmailBody As String
Dim Testing As Boolean = True
Dim Username = "email@example.com"
Dim Password = "testing"
POPClient = New Pop3.Pop3MimeClient(MailServer, 110, False, Username, Password)
'Connect to the POP server
Dim NumberOfEmails As Integer
Dim MailBoxSize As Integer
'*** Process orders ****
For i As Integer = 1 To NumberOfEmails
Dim DSO As New DropShipOrderClass
Dim m As New Pop3.RxMailMessage
'Get the next email
'Emails from test
If InStr(m.From.Address, "firstname.lastname@example.org") Then
'Email should only be processed if it's an order
If InStr(m.Subject, "Order") > 0 Then
DSO = CreateOrderFromEmail(m.Bod)
If Not DSO Is Nothing Then
OrderID = AddOrder(DSO, m.Body)
If OrderID > 0 Then
If Not Testing Then