When invoking th evatch mailer I get th efollowing error:
{“ERROR - Expecting: 354. Recieved: 503 Bad sequence of commands\r\n” }
[Aspose.Email.SmtpException]: {Aspose.Email.SmtpException}
System.Object: {Aspose.Email.SmtpException}
_className: “Aspose.Email.SmtpException”
_COMPlusExceptionCode: -532459699
_exceptionMethod:
_exceptionMethodString: null
_helpURL: null
_HResult: -2146232832
_innerException: { }
_message: “ERROR - Expecting: 354. Recieved: 503 Bad sequence of commands\r\n”
_remoteStackIndex: 0
_remoteStackTraceString: null
_source: null
_stackTrace: {System.Array}
_stackTraceString: null
_xcode: -532459699
xptrs: 0
HelpLink: null
HResult: -2146232832
InnerException: { }
Message: "ERROR - Expecting: 354. Recieved: 503 Bad sequence of commands\r\n"
Source: "Aspose.Email"
StackTrace: " at Aspose.Email.ProgressMonitor.x3ec48f67ecf640ee(Exception xfbf34718e704c6bc)\r\n at Aspose.Email.Batch.Send(ISender sender, Int32 packSize, Int32 delay, ProgressMonitor pm)\r\n at BusinessServices.DonorManager.SendPayPalEmailReceipts(String inStartDate, String inEndDate, String runReprint, String statusLogFilePath) in c:\businessservices\donormanager.cs:line 884"
TargetSite: {System.Reflection.RuntimeMethodInfo}
CODE SNIPPET
==============================
Aspose.Email.Message msg = new Aspose.Email.Message();
msg.From = new Aspose.Email.Address(emailParm.fromEmail);
msg.Subject = emailParm.subject;
Aspose.Email.TextPlainBody plainBody = new Aspose.Email.TextPlainBody();
plainBody.Content = “Dear ##Name## your amount is ##Amount##”;
msg.Body = plainBody;
Aspose.Email.Batch batch = new Aspose.Email.Batch();
DataTable dt = new DataTable();
dt.Columns.Add(“Name”, typeof(string));
dt.Columns.Add(“Amount”, typeof(string));
while(dr.Read())
{
dt.Rows.Add(new object[] { dr[“FirstName”], dr[“Amount”]});
batch.Merge(msg, new Aspose.Email.DataTableMerger(dt, dr[“toEmail”], string.Empty,
string.Empty));
}
batch.Send( new Aspose.Email.SmtpAccount(“serverName”,“25”, “testU”,“testPwd”),5,5000, new Aspose.Email.ProgressMonitor());