Author |
|
ksysiek Newbie
Joined: 07 March 2011
Online Status: Offline Posts: 3
|
Posted: 12 October 2011 at 12:02am | IP Logged
|
|
|
hi,
my company is using mailbee .net ver. 5.8.2.180 component for sending emails and it works mostly fine, but one of our new client is using open source zimbra server for as email server and he has problem with sending emails. He gets errorcode 30 IOException and no message sent.
here's the code i'm using for sending emails (i always get errorcode 52 SocketTimeout exception):
Smtp mailer = new Smtp();
mailer.DnsServers.Clear();
mailer.SmtpServers.Clear();
// Notify always.
mailer.DeliveryNotification.NotifyCondition = DsnNotifyCondition.Always;
// Notification message will include the message header of the original messsage.
mailer.DeliveryNotification.ReturnPortion = DsnReturnPortion.Header;
SmtpServer smtp = new SmtpServer();
smtp.Name = serverName;// i use mx.onto.pl server
smtp.AccountName = accounName;
smtp.Password = password;
smtp.Priority = 0;
smtp.SslProtocol = SecurityProtocol.Tls1;
smtp.Port = 587;
smtp.AuthMethods = AuthenticationMethods.None;
mailer.SmtpServers.Add(smtp);
HeaderEncodingOptions.Base64);
mailer.Connected += new ConnectedEventHandler(mailer_Connected);
mailer.TlsStarted += new TlsStartedEventHandler(mailer_TlsStarted);
mailer.SocketConnected += new SocketConnectedEventHandler(mailer_SocketConnected);
mailer.ResetMessage();
mailer.Connect();
mailer.Hello();
// create and send message
mailer.Send();
ExceptionMessage: Socket connection has timed out. InnerException message follows: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 62.121.116.73:587
and when i try to use port 25 i get:
The server rejected the given recipient. The server responded: 554 5.7.1 <emailadress>: Relay access denied.
so what shall i do co make it work? is it mailbee settings or zimbra server settings problem ?
thanks in advance
ksysiek
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 12 October 2011 at 12:11am | IP Logged
|
|
|
In your code, you supply SMTP account authentication details:
Code:
smtp.AccountName = accounName;
smtp.Password = password; |
|
|
However, those are not actually used due to this:
Code:
smtp.AuthMethods = AuthenticationMethods.None; |
|
|
With this line, MailBee is explicitly told not to use SMTP authentication, and most SMTP servers would decline non-authenticated attempts of sending mail to non-local domains. I suggest to try using one of AuthenticationMethods and see if that helps.
As for supplying SslProtocol, that is not required in most cases, be sure to supply required SslMode value and that should do the trick.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|