Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: ErrorMailBee.Security.MailBeeSslWin32Exce Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Assal
Newbie
Newbie


Joined: 27 January 2015
Location: United Kingdom
Online Status: Offline
Posts: 6
Posted: 27 January 2015 at 8:25am | IP Logged Quote Assal

I can send SMS using the mailbee, using web interface, But if I use the same code in an console application , when sending an email I'm receiving the below error.


Urgent: SMS Connection ErrorMailBee.Security.MailBeeSslWin32Exception: SSL-related Win32 function returned an error. See NativeErrorCode property value for more information. The Win32 error code is: -2146893007.
   at p.a(String A_0, Int32 A_1, Int32 A_2, Int32 A_3, String A_4, String A_5, String A_6, String A_7)
   at p.b(String A_0, Int32 A_1, Int32 A_2, Int32 A_3, String A_4, String A_5, String A_6, String A_7)
   at c8.a(SecurityProtocol A_0)
   at be.b()
   at be.e()
   at a.e()
   at a.a(String A_0)
   at a.a(MailMessage A_0, String A_1, EmailAddressCollection A_2, DeliveryNotificationOptions A_3, Smtp8bitDataConversion A_4, Boolean A_5, SendFailureThreshold A_6, Boolean A_7)
   at bm.a(MailMessage A_0, String A_1, EmailAddressCollection A_2, DeliveryNotificationOptions A_3, Smtp8bitDataConversion A_4, Boolean A_5, SendFailureThreshold A_6, Boolean A_7)
   at au.a(MailMessage A_0, String A_1, EmailAddressCollection A_2, DeliveryNotificationOptions A_3, Smtp8bitDataConversion A_4, Boolean A_5, SendFailureThreshold A_6, Int32 A_7)
   at by.a(String A_0, EmailAddressCollection A_1)
   at by.a(Boolean A_0, String A_1, EmailAddressCollection A_2)
   at
Back to Top View Assal's Profile Search for other posts by Assal
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 27 January 2015 at 9:53am | IP Logged Quote Alex

This Win32 error means "The client and server cannot communicate, because they do not possess a common algorithm.". The error occurs somewhere in Windows so I can only guess what it could mean. Perhaps, the server does not support some SSL algorithm.

Please enable log with Smtp.Log property (or which class you're using to send emails which are then treated as SMS messages by the third party). The log may shed more light on this.

There is also SmtpServer.SslProtocol property which you can from the default Auto value, e.g. Smtp.SmtpServers[0].SslProtocol = SecurityProtocol.Ssl3 but without the log file I can't be sure.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Assal
Newbie
Newbie


Joined: 27 January 2015
Location: United Kingdom
Online Status: Offline
Posts: 6
Posted: 28 January 2015 at 2:06am | IP Logged Quote Assal

Hi Alex,

Thanks you so much for the reply. I've enable smtp log . Please find the below log message.
[10:03:12.96] [INFO] Assembly version: 2.0.0.6.
[10:03:12.97] [INFO] Will send mail message.
[10:03:13.05] [INFO] Will send mail message to SMTP server "send.nhs.net".
[10:03:13.06] [INFO] Will resolve host "send.nhs.net".
[10:03:13.06] [INFO] Host "send.nhs.net" resolved to IP address(es) 10.222.62.43.
[10:03:13.06] [INFO] Will connect to host "send.nhs.net" on port 587.
[10:03:13.07] [INFO] Socket connected to IP address 10.222.62.43 on port 587.
[10:03:13.09] [RECV] 220 smtp.nhs.net service ready\r\n
[10:03:13.09] [INFO] Connected to mail service at host "send.nhs.net" on port 587 and ready.
[10:03:13.10] [INFO] Will send Hello command (HELO or EHLO).
[10:03:13.10] [SEND] EHLO nhs.net\r\n
[10:03:13.11] [RECV] 250-smtp.nhs.net Hello [192.168.17.121]\r\n250-SIZE 21504000\r\n250-PIPELINING\r\n250-DSN\r\n250-ENHANCEDSTATUSCODES\r\n250-STARTTLS\r\n250-AUTH\r\n250-8BITMIME\r\n250-BINARYMIME\r\n250 CHUNKING\r\n
[10:03:13.12] [INFO] SMTP Hello completed.
[10:03:13.12] [INFO] Notify server that we are ready to start TLS/SSL negotiation.
[10:03:13.12] [SEND] STARTTLS\r\n
[10:03:13.13] [RECV] 220 2.0.0 SMTP server ready\r\n
[10:03:13.13] [INFO] Start TLS/SSL negotiation sequence.
[10:03:13.15] [INFO] Will disconnect from host "send.nhs.net".
[10:03:13.15] [INFO] Disconnected from host "send.nhs.net".
[10:03:13.16] [INFO] Error: SSL-related Win32 function returned an error. See NativeErrorCode property value for more information. The Win32 error code is: -2146893007.

Thanks,
Assal
Back to Top View Assal's Profile Search for other posts by Assal
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 28 January 2015 at 2:13am | IP Logged Quote Igor

That's a really outdated version of the product, check if you're getting the same problem using current version of MailBee.NET Objects available for download here.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Assal
Newbie
Newbie


Joined: 27 January 2015
Location: United Kingdom
Online Status: Offline
Posts: 6
Posted: 28 January 2015 at 4:01am | IP Logged Quote Assal

Thanks Igor.

It is working with the current version.

Regards,
Assal
Back to Top View Assal's Profile Search for other posts by Assal
 
Assal
Newbie
Newbie


Joined: 27 January 2015
Location: United Kingdom
Online Status: Offline
Posts: 6
Posted: 05 February 2015 at 7:35am | IP Logged Quote Assal

Hi Igor,

It is taking 2 to 3 minutes to send one SMS. It is very slow in the server.

In the log file it stops recording when it reaches
"[14:36:03.59] [RECV] 220 2.0.0 SMTP server ready\r\n"

Then it waited for 2 minutes then started to send one SMS.

[14:38:19.44] [INFO] Message successfully submitted to SMTP server.
[14:38:19.44] [SEND] QUIT\r\n
[14:38:19.46] [RECV] 221 2.0.0 Service closing transmission channel\r\n
[14:38:19.46] [INFO] Will disconnect from host "send.nhs.net".
[14:38:19.46] [INFO] Disconnected from host

Thanks,
Assal

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

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 05 February 2015 at 11:18am | IP Logged Quote Alex

What's in between? Looks like you omitted many commands in between.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Assal
Newbie
Newbie


Joined: 27 January 2015
Location: United Kingdom
Online Status: Offline
Posts: 6
Posted: 10 February 2015 at 6:04am | IP Logged Quote Assal

Hi Alex,

Please find the full log file

[14:35:57.97] [INFO] Assembly version: 8.0.2.428.
[14:35:57.97] [INFO] Will send mail message.
[14:35:58.43] [INFO] Will resolve host "xxxx.xxx.net".
[14:35:58.43] [INFO] Host "xxxx.xxx.net" resolved to IP address(es) xx.xxx.xx.xx.
[14:35:58.43] [INFO] Will connect to host "send.xxx.net" on port 543.
[14:35:58.46] [INFO] Socket connected to IP address xx.xxx.xx.xx on port 543.
[14:36:03.50] [RECV] 220 smtp.xxx.net service ready\r\n
[14:36:03.51] [INFO] Connected to mail service at host "send.xxx.net" on port 543 and ready.
[14:36:03.53] [INFO] Will send Hello command (HELO or EHLO).
[14:36:03.54] [SEND] EHLO [xx.xxx.xxx.xxx]\r\n
[14:36:03.56] [RECV] 250-smtp.xxx.net Hello [192.168.17.121]\r\n250-SIZE 21504000\r\n250-PIPELINING\r\n250-DSN\r\n250-ENHANCEDSTATUSCODES\r\n250-STARTTLS\r\n250-AUTH\r\n250-8BITMIME\r\n250-BINARYMIME\r\n250 CHUNKING\r\n
[14:36:03.58] [INFO] SMTP Hello completed.
[14:36:03.58] [INFO] Notify server that we are ready to start TLS/SSL negotiation.
[14:36:03.58] [SEND] STARTTLS\r\n
[14:36:03.59] [RECV] 220 2.0.0 SMTP server ready\r\n
[14:38:18.88] [INFO] Will send Hello command (HELO or EHLO).
[14:38:18.88] [SEND] EHLO [xx.xxx.xxx.xxx]\r\n
[14:38:18.90] [RECV] 250-smtp.xxx.net Hello [192.168.17.121]\r\n250-SIZE 21504000\r\n250-PIPELINING\r\n250-DSN\r\n250-ENHANCEDSTATUSCODES\r\n250-AUTH LOGIN\r\n250-8BITMIME\r\n250-BINARYMIME\r\n250 CHUNKING\r\n
[14:38:18.90] [INFO] SMTP Hello completed.
[14:38:18.91] [INFO] Will login as "xxxxx.it@xxx.net".
[14:38:18.93] [INFO] Will try SASL LOGIN authentication method.
[14:38:18.94] [SEND] AUTH LOGIN\r\n
[14:38:18.94] [RECV] 334 VhhjXNlcm5hbWU6\r\n
[14:38:18.97] [SEND] ********\r\n
[14:38:19.15] [RECV] 334 UGFloiklkzc3dvcmQ6\r\n
[14:38:19.15] [SEND] ********\r\n
[14:38:19.16] [RECV] 235 2.7.0 Authentication successful\r\n
[14:38:19.16] [INFO] Logged in as "xxxxx.it@xxx.net".
[14:38:19.16] [INFO] Will send mail message to SMTP server "send.xxx.net".
[14:38:19.27] [INFO] Will submit sender and recipients.
[14:38:19.27] [SEND] MAIL FROM:<xxxxx.it@xxx.net>\r\n
[14:38:19.27] [SEND] RCPT TO:<07766668991@sms.xxx.net>\r\n
[14:38:19.29] [RECV] 250 2.1.0 Sender OK\r\n
[14:38:19.29] [RECV] 250 2.1.5 Recipient OK\r\n
[14:38:19.29] [INFO] Sender and recipients accepted by SMTP server.
[14:38:19.29] [INFO] Will send message data now.
[14:38:19.30] [SEND] BDAT 328 LAST\r\n
[14:38:19.30] [SEND] MIME-Version: 1.0\r\nX-Mailer: MailBee.NET 8.0.2.428\r\nFrom: xxxxx. ... uoted-printable\r\n\r\nsms test local test from PCxxxxx 05 feb 2015 [Data chunk of 328 bytes sent.]
[14:38:19.44] [RECV] 250 2.6.0 <1.238480112f1242ae7d01@PCxxxxx> Queued mail for delivery\r\n
[14:38:19.44] [INFO] Message successfully submitted to SMTP server.
[14:38:19.44] [SEND] QUIT\r\n
[14:38:19.46] [RECV] 221 2.0.0 Service closing transmission channel\r\n
[14:38:19.46] [INFO] Will disconnect from host "xxxx.xxx.net".
[14:38:19.46] [INFO] Disconnected from host "xxxx.xxx.net".
[14:38:19.47] [INFO] Mail message sent.

Thanks,
Assal
Back to Top View Assal's Profile Search for other posts by Assal
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 10 February 2015 at 6:33am | IP Logged Quote Igor

Indeed, the log shows the delay over 2 minutes between these two lines:

Code:
[14:36:03.59] [RECV] 220 2.0.0 SMTP server ready\r\n
[14:38:18.88] [INFO] Will send Hello command (HELO or EHLO).


but it doesn't look like a delay on server's end, more like something happening on the application level. Please recheck if your application is doing anything between enabling STARTTLS and sending HELO; are you using just the Send method, or the application performs explicit connect to the server as well?

If you provide us with a self-contained sample which allows for reproducing the problem, we could look into this for you.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 10 February 2015 at 6:40am | IP Logged Quote Alex

Looks like there is a problem with SSL handshake. The server is very slow when establishing SSL connection. Perhaps, that the reason why old version of MailBee returned this error (there was a timeout during SSL negotiation, some data received only in part, and so on).

Please provide the real server name, we'll check if it's indeed slow on SSL. You can send this to Helpdesk.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Assal
Newbie
Newbie


Joined: 27 January 2015
Location: United Kingdom
Online Status: Offline
Posts: 6
Posted: 10 February 2015 at 9:38am | IP Logged Quote Assal

Hi Alex,

I've sent the server name to help desk.

From my PC it takes 2-3 seconds to send a SMS.

Only If I send it from my test server it takes 2-3 minutes to send a SMS. This test server is a Virtual Machine , OS is Windows Server 2008.Does it make any difference?

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

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 10 February 2015 at 10:36am | IP Logged Quote Alex

Never heard of such slowdown of SSL negotiation so I can't say why it happens. You can try to play with different settings of SslProtocol property in SmtpServer class (that instance you're adding to Smtp.SmtpServers collection). Usually, it doesn't make any difference and the default Auto setting is fine. But maybe it will be different in your case.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
Daniel
Newbie
Newbie


Joined: 19 March 2015
Location: United States
Online Status: Offline
Posts: 2
Posted: 19 March 2015 at 1:19am | IP Logged Quote Daniel

Good work dude... Keep up the great work... And thanks for being sharing :)
Back to Top View Daniel's Profile Search for other posts by Daniel
 

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