Crash using authentication sample - WeOnlyDo Discussion board

Crash using authentication sample (wodSmtpServer / wodPop3Server / wodImapServer)

by mbeaton, Thursday, February 01, 2007, 12:03 (6298 days ago)

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

by woddrazen, Thursday, February 01, 2007, 12:36 (6298 days ago) @ mbeaton

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

by mbeaton, Thursday, February 01, 2007, 12:59 (6298 days ago) @ woddrazen

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

by woddrazen, Thursday, February 01, 2007, 13:12 (6297 days ago) @ mbeaton

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