Crash using authentication sample (wodSmtpServer / wodPop3Server / wodImapServer)
When i try to use authentication in my VB6 app when the wodSmtpServer1_Authenticate sub exits i get a crash.
I've used the sample (SmtpServerSamplesVBComponent2. Only Authenticated clients) provided by the installer and get the same result.
Re: Crash using authentication sample
Hi,
I have just tried and it worked for me. What kind of crash did you get?
Here is how I test it.
Start in VB6 wodSmtpServer sample 2. Only Authenticated clients.
Add under Authenticate Event AuthLogin Authentication:
-------------------------------
Case AuthLogin
If Username = joe And Password = joe Then Action = Allow
-------------------------------
Start Outlook Express. Make account to use login and password for sending e-mails. Send e-mail over wodSmtpServer and it worked like a charm. My wodSmtpServer didn't crash.
Maybe I did something wrong. Can you give us more details?
Make sure that you are using latest version of wodSmtpServer. Latest version is 2.2.5.48.
You can check version using wodSmtpServer Version Property.
Here is example:
---------------------------------
MsgBox (wodSmtpServer1.Version)
---------------------------------
Let us know how it goes.
Regards,
Drazen
Re: Crash using authentication sample
I'm using 2.2.5.48
Run the VB6 code in debug and put a breakpoint on the select statement.
Step through and VB6 crashes.
Without the breakpoint it works OK.
I've attached the exact code i'm using.
Private Sub wodSmtpServer1_Authenticate(ByVal User As WODSMTPSERVERCOMLib.ISmtpUser, ByVal Username As String, ByVal Password As String, ByVal AuthMethod As WODSMTPSERVERCOMLib.SmtpAuthentications, Action As WODSMTPSERVERCOMLib.SmtpActions)
Select Case AuthMethod
Case AuthLogin
If Username = SMTPRelay And Password = SMTPRelay Then Action = Allow
Case AuthPlain
If Username = SMTPRelay And Password = SMTPRelay Then Action = Allow
Case AuthCramMD5
If Username = SMTPRelay And User.CalcCramMD5( SMTPRelay ) = Password Then Action = Allow
End Select
End Sub
Re: Crash using authentication sample
Hi,
It is working again. i put break point on line
Private Sub wodSmtpServer1_Authenticate(ByVal User As WODSMTP..............
and it worked again. Message was send successfully and VB6 didn't crash.
What client did you use for sending e-mail? I'm using Outlook Express 6.
Drazen