503 Bad sequence of commands ERROR

Hi,

We are trying to send emails through a Lotus Domino SMTP server and we are getting the following error. The same code is working fine when we are sending mails through Microsoft Exhange server.

Please advise.

Thanks,
Suresh

Aspose.Network.Mail.SmtpException: ERROR - Expecting: 354. Recieved: 503 Bad
sequence of commands - - Need recipients first

at
Aspose.Network.Mail.SmtpConnection.x7518504da38b331f(MailMessage
x8a41fbc87a3fb305)
at
Aspose.Network.Mail.MailMessage.Send(SmtpConnection smtpConnection)

at
Dennemeyer.DIAMS.Common.SendEmail.SendEmailAction(String sFrom, String
sFriendlyName, String sTo, String sCc, String sBcc, String sSubject, String
sBody, ArrayList arAttachments, ArrayList arFileNames)
at
Dennemeyer.DIAMS.Events.MessageTrigger.Evaluate(TransactionPacket oPacket,
String sXMLInfo, String sAssetInfo, String sAssetResourceInfo, String
sTriggerResourceInfo, String sAssetRecentTaskInfo)
at
Dennemeyer.DIAMS.Events.BusinessEvent.Process(TransactionPacket oPacket, Int64
lEventID, String sAssetInfo, String sAssetResourceInfo, String
sConditionWhereClause, String sConditionXML)
at
Dennemeyer.DIAMS.Providers.TriggerCheck.HandleRequest(TransactionPacket
oPacket)
at
Dennemeyer.DIAMS.Providers.PSCheck.HandleRequest(TransactionPacket
oPacket)
at
Dennemeyer.DIAMS.Providers.ServiceRequestTransaction.DoExecuteSingle(String
sRequestXML, String sUserInfo, Hashtable oAddtional, Int64
lTransactionID)]]>

Hi, Suresh,

Could you provide me a SMTP account for our debugging? Therefore, we can locate the problem as soon as possible and fix it. The account will be used only the purpose of debugging.

My email is guangzhou#aspose.com.

Thanks

Hi,

This problem is happening in our client location. I don’t have access to their SMTP server and also I don’t think I can provide you access to their SMTP Server.

It would be helpful if you can answer following questions for me.

1. Whether we can send emails through Lotus Domino server using Aspose mail utility?

2. If yes, then do we need to do anything differently for Lotus Domino SMTP server than for Microsoft Exchange SMTP Server?

3. Do you have a test environment whith Lotus Domino SMTP Server?

4. Can you send us a code snippet for sending email message through Lotus Domino SMTP server?

Looking at the error message it appears to me that we should send TO address first. Let me know you thoughts.

Thanks,
Suresh

Dear Suresh,

Could you provide me the version of Aspose.Network you are using. Our developers are looking into the root.

We donot have Lotus Domino Smtp Server.

Hi,

Aspose.Network.dll version is 2.3.1.0

Lotus Domino Server version is 6.53

Thanks,
Suresh

Dear Suresh,

1. Could you please add a check in the code to make sure the TO/CC/BCC list are not empty. We go through the code. It is likely that the recipients of the email message are empty.

2. Could you please post your code here? Therefore, we can have more information about debugging.

3. Could you provide us a Lotus Smtp for debugging? Otherwise, we will try to provide you a debug build to log more information.

Thanks

Hi,

I have checked that the TO and FROM has email ID. So the recepient is not empty.

public bool SendEmailAction(string sFrom,string sFromFriendlyName, string sTo, string sCc, string sBcc, string sSubject, string sBody,string sAttachments)
{
    Aspose.Network.License license = new Aspose.Network.License();
    license.SetLicense("Aspose.Network.lic");

    Aspose.Network.Mail.MailMessage mailitem = new Aspose.Network.Mail.MailMessage();
    Aspose.Network.Mail.SmtpConnection smtp;

    string sSmtpServer = "localhost";
    string fromAddress = "";
    string sUploadPath = "";

    // if you have it defined, make it available
    if (ConnectionGroupStaticCaller.GetGroupProperty("SmtpServer") != null)
    {
        sSmtpServer = ConnectionGroupStaticCaller.GetGroupProperty("SmtpServer").ToString();
    }

    smtp = new Aspose.Network.Mail.SmtpConnection(sSmtpServer);

    if (ConnectionGroupStaticCaller.GetGroupProperty("FromEmail") != null)
    {
        fromAddress = ConnectionGroupStaticCaller.GetGroupProperty("FromEmail").ToString();
    }

    if (ConnectionGroupStaticCaller.GetGroupProperty("WebsitePath") != null)
    {
        sUploadPath = ConnectionGroupStaticCaller.GetGroupProperty("UploadWebsitePath") + "Uploads\\";
    }

    Aspose.Network.Mail.TextPlainBody plainBody = new Aspose.Network.Mail.TextPlainBody(sBody) ;
    //Aspose.Network.Mail.TextHtmlBody htmlBody = new Aspose.Network.Mail.TextHtmlBody() ;
    //htmlBody.Content = sBody;
    plainBody.Content = sBody;

    Aspose.Network.Mail.AlternativeBody body = new Aspose.Network.Mail.AlternativeBody() ;
    body.AddPart(plainBody) ;
    //body.AddPart(htmlBody) ;
    mailitem.Body = body;

    mailitem.From = new Aspose.Network.Mail.MailAddress(sFrom,sFromFriendlyName);

    string[] sToAddresses = sTo.Split(',');
    mailitem.To.AddRange(sToAddresses);

    if (!sCc.Equals(String.Empty))
    {
        string[] sCcAddresses = sCc.Split(',');
        mailitem.Cc.AddRange(sCcAddresses);
    }

    if (!sBcc.Equals(String.Empty))
    {
        string[] sBccAddresses = sBcc.Split(',');
        mailitem.Bcc.AddRange(sBccAddresses);
    }
	
	//add the attachments to email
string[] sSplitArry = sAttachments.Split('#');
string sAttPath = String.Empty;

if(sSplitArry.Length > 0)
{
    Aspose.Network.Mail.Attachment attachment;
    for(int Index = 0; Index < sSplitArry.Length-1; Index++)
    {
        sAttPath = sUploadPath + sSplitArry[Index];
        attachment = new Aspose.Network.Mail.Attachment(sAttPath);
        mailitem.AddAttachment(attachment);
        File.Delete(sUploadPath + sSplitArry[Index]);
    }
}

mailitem.Save(sUploadPath + mailitem.Subject);
mailitem.Send(smtp);

return true;

We can not provide you a Lotus Domino server for debugging.

Thanks,
Suresh

Hi,

Is there any update to this above issue??? I need your help in resolving this issue at the earliest.

Thanks,
Suresh


Dear Suresh,

Could you use the attached dll ? We have add some debugging message in this checked version of dll.

Send me the exception message if you get any.

Thanks,

Can you please send me the License file for this DLL. You can send me the License file to spadhiary@dennemeyer.com. This DLL doesn’t work with our current license file.

Thanks,
Suresh

I have sent you anther version of dll. Check your email box

Thanks