Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Error on send mail using SMTPS Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
danyc74
Newbie
Newbie


Joined: 29 November 2011
Online Status: Offline
Posts: 2
Posted: 29 November 2011 at 1:36am | IP Logged Quote danyc74

Hello there,

I'm tring to send an email using a SMTPS server.
This is the code.

--------------------------------------------
Dim s As New SmtpServer
s.AuthOptions = MailBee.AuthenticationOptions.DisableSimpleMethodAfterSecure
s.Name = Me.txtServerSMTP.Text
s.HelloDomain = C.Email.Split("@")(1)

's.AuthPopBeforeSmtp = True

s.AuthMethods = MailBee.AuthenticationMethods.Auto
's.AuthMethods = m.GetSupportedAuthMethods
m.Log.WriteLine(s.AuthMethods.ToString)

s.AccountName = Me.txtUsername.Text
s.Password = Me.txtPassword.Text

s.Port = Me.txtServerSMTPPort.Text
s.SslProtocol = MailBee.Security.SecurityProtocol.Auto
s.SslMode = MailBee.Security.SslStartupMode.OnConnect

m.SmtpServers.Add(s)

m.Message.From.AsString = Me.txtEmail.Text
m.Message.To.AsString = Me.txtEmail.Text
m.Message.Subject = "Test"
m.BodyPlainText = "Test"
m.Log.WriteLine("Sending message...")
m.Send()
--------------------------------------------

This is the log

[INFO] Assembly version: 7.0.2.334.
[USER] Auto
[USER] Sending message...
[INFO] Will send mail message.
[INFO] Will resolve host "smtps.pec.aruba.it".
[INFO] Host "smtps.pec.aruba.it" resolved to IP address(es) 62.149.152.91.
[INFO] Will connect to host "smtps.pec.aruba.it" on port 465.
[INFO] Socket connected to IP address 62.149.152.91 on port 465.
[RECV] 220 smtps.pec.aruba.it ESMTP Postfix\r\n
[INFO] Connected to mail service at host "smtps.pec.aruba.it" on port 465 and ready.
[INFO] Will send Hello command (HELO or EHLO).
[SEND] EHLO cnfpec.it\r\n
[RECV] 250-smtps.pec.aruba.it\r\n250-PIPELINING\r\n250-SIZE 104857600\r\n250-ETRN\r\n250-AUTH LOGIN PLAIN\r\n250-ENHANCEDSTATUSCODES\r\n250 8BITMIME\r\n
[INFO] SMTP Hello completed.
[INFO] Will login as "xxxxxxx@cnfpec.it".
[INFO] Will try SASL LOGIN authentication method.
[SEND] AUTH LOGIN\r\n
[RECV] 334 VXNlcm5hbWU6\r\n
[SEND] YXZ2bWFyY29iaWdpQGNuZnBlYy5pdA==\r\n
[RECV] 334 UGFzc3dvcmQ6\r\n
[SEND] anV2ZW50dXM3MQ==\r\n
[RECV] 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6\r\n
[INFO] Will disconnect from host "smtps.pec.aruba.it".
[INFO] Disconnected from host "smtps.pec.aruba.it".
[INFO] Error: The server has rejected authentication data sent by the client. The server responded: 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6.


Some other info.

If I uncomment
's.AuthMethods = m.GetSupportedAuthMethods
I get None as answer.

If I uncomment

's.AuthPopBeforeSmtp = True
I get this error

Will connect to host "smtps.pec.aruba.it" on port 110.   
Error: Socket connection has been refused by remote host.

Please help me how to fix this error.
Thanks in advance.

Daniele
Back to Top View danyc74's Profile Search for other posts by danyc74
 
danyc74
Newbie
Newbie


Joined: 29 November 2011
Online Status: Offline
Posts: 2
Posted: 29 November 2011 at 2:19am | IP Logged Quote danyc74

Sorry, I forgot to tell you I'm using MailBee.NET version 6.0.2.220, but I have tried even the 7.0.2.334 trial version.

Bye
Daniele

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

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 29 November 2011 at 8:59am | IP Logged Quote Alex

1. How do you know the login/password is correct? Do you use the same login/password with another SMTP client? Outlook won't count as it's usually MAPI client rather than SMTP.

For instance, some servers require full email address as login while others - only account name part. And some servers use completely different email address and login name.

2.
Quote:

If I uncomment
's.AuthMethods = m.GetSupportedAuthMethods
I get None as answer.

Sure you do. MailBee.NET does not know supported methods of this server until you connected and said Hello. That's why it's None initially.

3. POP-before-SMTP is not supported by most servers nowdays.

Regards,
Alex
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