Search The ForumSearch   RegisterRegister  LoginLogin

MailBee SMTP

 AfterLogic Forum : MailBee SMTP
Subject Topic: Secure Password Authentication Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Ramana
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 21 May 2004 at 9:44am | IP Logged Quote Ramana

Hi,
I am trying to write an VB app, which has to send mails with Secure Password authentication for SMTP. Is it possible with MailBee SMTP Component. If yes, Can anybody post a sample code.

Thanks in advance,

Ramana


Back to Top View Ramana's Profile Search for other posts by Ramana
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 21 May 2004 at 10:12am | IP Logged Quote Alex

Yes, you can easily send emails with MailBee SMTP using SPA.

The sample code is shown below.

Dim objSMTP

Set objSMTP = CreateObject("MailBee.SMTP")

' Enable logging SMTP session into a file,
' useful for debugging
objSMTP.EnableLogging = True
objSMTP.LogFilePath = "C:\smtp_log.txt"
objSMTP.ClearLog

objSMTP.LicenseKey = "your key"

objSMTP.ServerName = "mail.server.com"

' Enable secure password authentication (SPA)
objSMTP.AuthMethod = 4

' Username and passsword for SPA
objSMTP.UserName = "user"
objSMTP.Password = "pass"

objSMTP.Message.FromAddr = "from@addr.com"
objSMTP.Message.ToAddr = "to@addr.com"
objSMTP.Message.Subject = "Hello"
objSMTP.Message.BodyText = "Message sent using SPA"

If objSMTP.Connect Then
objSMTP.Send
objSMTP.Disconnect
End If
Back to Top View Alex's Profile Search for other posts by Alex
 
Ramana
Guest Group
Guest Group


Joined: 10 November 2003
Online Status: Online
Posts: 262
Posted: 21 May 2004 at 10:30am | IP Logged Quote Ramana

Alex,Thanks for your response. I am getting 'Unrecognized authentication type' error, when trying to send mail. here is entire log.

10:22:43 [Connecting to server smtp.email.msn.com at port 25 from domain ......]
10:22:43 [Entering ESMTP authentication mode]
10:22:43 [Sending ehlo]
10:22:43 [Using NTLM authentication]
10:22:43 [Error: Negative or void server response]
10:22:43 [Server responded: 504 5.7.4 Unrecognized authentication type.\r\n]
10:22:43 [Possible error reason: NTLM authentication type (auth ntlm command) is not supported by this server]
10:22:43 [Error: Connection failure]

Back to Top View Ramana's Profile Search for other posts by Ramana
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 21 May 2004 at 11:02am | IP Logged Quote Alex

This is because your SMTP server does not support particular type of SPA. You can try to send using another value for SMTP.AuthMethod property:

AuthMethod=3 enables secure CRAM-MD5 authentication

If this also doesn't work, your server does not support SPA. You can still use insecure authentication with
AuthMethod=2.
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide