Author |
|
mpeyer Newbie
Joined: 27 August 2007
Online Status: Offline Posts: 2
|
Posted: 27 August 2007 at 4:04pm | IP Logged
|
|
|
Hi
I get an exception sending an email over the gmail smtp server (smtp.googlemail.com)
However the mail is sent but on disconnecting a MailBeeSslWin32Exception is throwed. I use the simply Send() method on my Smtp object instance.
But this Send method throws the mentioned exception.
Here's my Smtp configration method:
Code:
private void ConfigureSmtpServer(Smtp smtp)
{
SmtpServer smtpSrv = new SmtpServer();
smtp.Log.Enabled = true;
smtp.Log.Filename = @"C:\logs\KCMMailingListManager.txt";
smtp.SmtpServers.Add(smtpSrv);
smtpSrv.Name = ConfigurationSettings.AppSettings["Smtp.MailHost"];
smtpSrv.Port = Int32.Parse(ConfigurationSettings.AppSettings["Smtp.Port"]);
smtpSrv.AuthMethods = AuthenticationMethods.Auto;
smtpSrv.AccountName = ConfigurationSettings.AppSettings["Smtp.UserName"];
smtpSrv.Password = ConfigurationSettings.AppSettings["Smtp.SendingAccountPassword"];
if(Boolean.Parse(Configuration Settings.AppSettings["Smtp.UseSsl"]))
{
smtpSrv.SslProtocol = SecurityProtocol.Auto;
smtpSrv.AuthMethods = AuthenticationMethods.Auto;
smtpSrv.SslMode = SslStartupMode.OnConnect;
// smtpSrv.SslMode = SslStartupMode.UseStartTls; //leads to SockedTimeoutException
}
}
|
|
|
Here's the log:
Code:
[00:49:04.17] [INFO] Will send mail message.
[00:49:04.19] [INFO] Will send mail message to SMTP server "smtp.googlemail.com".
[00:49:04.19] [INFO] Will resolve host "smtp.googlemail.com".
[00:49:04.20] [INFO] Host "smtp.googlemail.com" resolved to IP address(es) 209.85.129.16.
[00:49:04.20] [INFO] Will connect to host "smtp.googlemail.com" on port 465.
[00:49:04.22] [INFO] Socket connected to IP address 209.85.129.16 on port 465.
[00:49:04.28] [RECV] 220 mx.google.com ESMTP 31sm5486610fkt\r\n
[00:49:04.29] [INFO] Connected to mail service at host "smtp.googlemail.com" on port 465 and ready.
[00:49:04.29] [INFO] Will send Hello command (HELO or EHLO).
[00:49:04.30] [SEND] EHLO playboater.ch\r\n
[00:49:04.32] [RECV] 250-mx.google.com at your service, [81.221.73.132]\r\n250-SIZE 28311552\r\n250-8BITMIME\r\n250-AUTH LOGIN PLAIN\r\n250 ENHANCEDSTATUSCODES\r\n
[00:49:04.32] [INFO] SMTP Hello completed.
[00:49:04.33] [INFO] Will login as "kcm.ag.ch".
[00:49:04.33] [INFO] Will try SASL LOGIN authentication method.
[00:49:04.33] [SEND] AUTH LOGIN\r\n
[00:49:04.35] [RECV] 334 VXNlcm5hbWU6\r\n
[00:49:04.36] [SEND] ********\r\n
[00:49:04.38] [RECV] 334 UGFzc3dvcmQ6\r\n
[00:49:04.38] [SEND] ********\r\n
[00:49:04.72] [RECV] 235 2.7.0 Accepted\r\n
[00:49:04.72] [INFO] Logged in as "kcm.ag.ch".
[00:49:04.73] [INFO] Will submit sender and recipients.
[00:49:04.73] [SEND] MAIL FROM:<webmaster@playboater.ch>\r\n
[00:49:04.77] [RECV] 250 2.1.0 OK\r\n
[00:49:04.77] [SEND] RCPT TO:<webmaster@playboater.ch>\r\n
[00:49:04.79] [RECV] 250 2.1.5 OK\r\n
[00:49:04.80] [INFO] Sender and recipients accepted by SMTP server. Will send message data now.
[00:49:04.80] [SEND] DATA\r\n
[00:49:04.93] [RECV] 354 Go ahead\r\n
[00:49:04.93] [SEND] [Data chunk of 1783 bytes sent.]
[00:49:04.94] [SEND] \r\n.\r\n
[00:49:05.22] [RECV] 250 2.0.0 OK 1188254945 31sm5486610fkt\r\n
[00:49:05.23] [INFO] Message successfully submitted to SMTP server.
[00:49:05.23] [SEND] QUIT\r\n
[00:49:05.25] [INFO] Will disconnect from host "smtp.googlemail.com".
[00:49:05.35] [INFO] Disconnected from host "smtp.googlemail.com".
[00:49:05.35] [INFO] Error: SSL-related Win32 function returned an error. See NativeErrorCode property value for more information. The Win32 error code is: -2146893048.
|
|
|
Does anybody have an idea?
Regards, Marc
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 28 August 2007 at 1:09am | IP Logged
|
|
|
It's safe to ignore this error. Gmail incorrectly closes connection when the SMTP session ends.
In the latest version of MailBee.NET.dll, we have already added a workaround for this so the exception is not thrown.
Best regards,
Andrew
|
Back to Top |
|
|
mpeyer Newbie
Joined: 27 August 2007
Online Status: Offline Posts: 2
|
Posted: 30 August 2007 at 12:01am | IP Logged
|
|
|
Thank you, that solved the problem.
I thought I have the latest version because I downloaded it about 2 weeks ago. But that was from another site and obviously not the current version... The latest version is also much more faster.
Regards
Marc
|
Back to Top |
|
|