SMTPServer within a .Net application - WeOnlyDo Discussion board

SMTPServer within a .Net application (General questions)

by DerekThoms, Saturday, January 28, 2006, 02:05 (6874 days ago)

When I try to use the SMTPServer object within a .Net application the component accepts port 25 requests but just hangs. Below is some VB.Net sample code to generate the problem (it also happens when I use the Notifications Interface code as well). Hope someone can help.

Option Explicit On
Imports WODSMTPSERVERCOMLib

Public Class SMTPServerWrapper
Public WithEvents _SMTPServer As wodSmtpServerCom

Public Sub Setup()
_SMTPServer = New wodSmtpServerCom
_SMTPServer.Threads = ThreadTypes.FullThreads
_SMTPServer.Port = 25
_SMTPServer.GreetingMessage = SMTP Receiver
_SMTPServer.GoodbyeMessage = SMTP Receiver
_SMTPServer.Start()
End Sub

Protected Sub MailReceived(ByVal User As WODSMTPSERVERCOMLib.SmtpUser, ByRef Action As WODSMTPSERVERCOMLib.SmtpActions) Handles _SMTPServer.MailReceived
Debug.WriteLine( Got mail )
End Sub

end class


Complete thread: