Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: The server has rejected authentication Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Anand
Newbie
Newbie


Joined: 22 January 2008
Location: New Zealand
Online Status: Offline
Posts: 2
Posted: 22 January 2008 at 4:34pm | IP Logged Quote Anand

We get following message when our application tries to send an email...
==============================================
01/21/2008 15:01:15 Type : MailBee.SmtpMail.MailBeeSmtpLoginBadCredentialsException, MailBee.NET, Version=3.0.2.74, Culture=neutral, PublicKeyToken=cd85b70fb26f9fc1 Message : The server has rejected authentication data sent by the client.
The server responded: 535 5.7.3 Authentication unsuccessful..
Source : MailBee.NET Help link : AccountName : Password : ResponseCode : 535 IsTransientError : False ResponseString : 535 5.7.3 Authentication unsuccessful. ResponseEncoding : System.Text.SBCSCodePageEncoding RemoteEndPoint : 10.104.8.70:25 RemoteHostName : mailgate.nzpost.co.nz Protocol : Smtp ErrorCode : 116
==============================================

Can anyone help with a solution?

Regards,
Anand
Back to Top View Anand's Profile Search for other posts by Anand
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 23 January 2008 at 12:12am | IP Logged Quote Andrew

Are you sure the application tries to authenticate with correct username and password? In most cases "535 5.7.3 Authentication unsuccessful" response means incorrect credentials.

Please try to vary username as follows:

- username (just username)
- username@domain.com (full e-mail)
- domain.com\username (domain\user)

Please also try to send a message from the same account on the same SMTP server using another e-mail client like MS Outlook (or Outlook Express). Is it able to authenticate on that SMTP server?

If the above doesn't help, please enable logging SMTP session into a file, reproduce the issue and provide us with the log file for examination. You can enable logging as follows:

[C# syntax]
Code:

Smtp mailer = new Smtp();
mailer.Log.Enabled = true;
mailer.Log.Filename = @"C:\log.txt";


[VB.NET syntax]
Code:
Dim mailer = New Smtp
mailer.Log.Enabled = True
mailer.Log.Filename = "C:\log.txt"


Please make sure the application has permission to write into the specified location.

You can send us the log file via Request Support Form.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
Anand
Newbie
Newbie


Joined: 22 January 2008
Location: New Zealand
Online Status: Offline
Posts: 2
Posted: 23 January 2008 at 2:50pm | IP Logged Quote Anand

JFYI ..our mail server does not take any username or password.....please have a look at the code below...

Actually, Development SMTP server requires Username & Password but Production server does not. Application is working fine in Development environment but we are facing problems in Production ( Where we are supplying username/passwords as blanks).

C# - Code Looking for UserName/Password

smtpMail.SmtpServers.Add(ConfigurationManager.AppSettings["MailServer"] .ToString(),                ConfigurationManager.AppSettings["MailUserName"].ToString(), ConfigurationManager.AppSettings["MailPassword"].ToString());

Web.config - Entry - In Production Environment
<add key="MailUserName" value=""/>
           <add key="MailPassword" value=""/>
           <add key="MailServer" value="mailgate.nzpost.co.nz"/>

Thanks;
Anand
Back to Top View Anand's Profile Search for other posts by Anand
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 24 January 2008 at 2:48am | IP Logged Quote Andrew

Please try to use this overload of SmtpServerCollection.Add method. It doesn't require credentials and doesn't perform SMTP authentication.

So, for production environment, the code would look like:

Code:
smtpMail.SmtpServers.Add(ConfigurationManager.AppSettings["MailServer"].ToString());


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

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