| Author |  | 
      
        | Guests Guest Group
 
  
 
 Joined: 10 November 2003
 Online Status: Online
 Posts: 262
 | 
          MailBee 5.11
           | Posted: 25 March 2005 at 4:42am | IP Logged |   |  
           | 
 |  Visual Basic 6.0/SP6
 Windows 2003 Server
 MSExchange 2003
 
 I've written a VB program that reads POP3 emails from my ISP, and then creates them on my MS Exchange server using SMTP.
 It was all working fine except I was receiving a lot of SPAM. I realised that this was because I always send the received POP3 email to a valid MS Exchange account, so I modified the code to send to the address specified in the original Email.
 So for example I would received an Email from junk@somcompany.com but would always send it to joe@mycompany.com. Because this destination address was valid ALL email was getting through.
 
 So I changed the code to:
 objSMTP.ToAddr = objMsg.PureToAddr
 from
 objSMTP.ToAddr = "joe@mycompany.com"
 
 And it all works great. Exchange only delivers Email that has a destination address it recognises.
 However, after I have performed an objSMTP.Send, making sure the return code is ok, I then delete the POP3 message and then process the next message in the list.
 At the end of the cycle, I then perform a POP3 Disconnect to force all the messages to be actually deleted from my ISP's server.
 However, it turns out that messages that were sent too invalid addresses are not deleted.
 
 I've debugged the code and watched it perform
 objPop3.DeleteMessage lMsgCount
 
 on every message found, but only messages that contained valid Exchange addresses seem to be deleted.
 
 Are that are special reasons why in a batch of say 10 POP3 emails of which 3 are to addresses recognised by my Exchange server, that the DeleteMessage/Disconnect would only delete those 3 and leave the rest?
 
 It's as if it knows that the addresses of some Email were not valid and so refuses to delete them from the POP3 server...
 
 Joe.
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          What does MailBee log say (when POP3.EnableLogging=True and POP3.LogFilePath="path to log")?
           | Posted: 25 March 2005 at 8:17am | IP Logged |   |  
           | 
 |  
 Also, isn't it possible that some mails you're deleting re-arrive into the mailbox? I.e. mail is deleted but the same mail arrives then.
 
 To tell for sure, it would be better to have a look at actual code which performs all the activity. You can send us MailBee log and the your code to mailbee@iforum.com for review.
 
 Regards,
 Alex
 
 | 
       
        | Back to Top |     | 
       
       
        |  |