Cant send mail in Vista by using MX Server with the DLL 4.1.2.0.. Please help

Hi,

I am having trouble with the DLL Version 4.1.2.0. I cannot send mail in vista by using the MX Server option. But it is working fine with XP (Both in MX server and SMTP server)

I was using the DLL version 3.8.1.6 and was working fine with Vista and XP (Both MX and SMTP options). But it was not SSL enabled. Now the new DLL Version 4.1.2.0 is SSL enabled but not working well with vista by using MX option. Can I have a SSL enabled DLL which works well with both MX and SMTP in Vista and XP?

Please reply as soon as possible.

With thanks and regards,

Sajeesh…

Hi,
Why no reply for my previous mail.?
I am waiting for your reply, Please send me as soon as possible.
Regards,
Sajeesh

Hi Sajeesh,

Our developers are working at this issue and will back to you ASAP. Sorry if any inconvenience.

Thanks

Hi,
Is there is any new update??? we are waiting here…Its very urgent…Please help ASAP
Regards,
Sajeesh

Hello, Sajeesh,

Sorry for any delays.

I would like to know that

1. the v3.8.1.6 can work on your environment by not the latest v4.* dll?

2. could you please provide some of your code to us?

Thanks

This is the code I am using for sending single e-mail: I am using the dll version 4.1.2.0

DnsMailClient dns = new DnsMailClient();
MailMessage msg = CreateMessage();
SendMX(msg, dns);

private MailMessage CreateMessage()
{
MailMessage msg = new MailMessage();

msg.From = new MailAddress(“sajeesh@yahoo.co.in”);

msg.To.Add("sajeesh007s@gmail.com");

msg.Subject = “test mail”;

msg.HtmlBody = General.MsgHtmlBody ; /// passing variable

msg.Date = DateTime.Now;

return msg;
}

private void SendMX(MailMessage msg, DnsMailClient dnsclient)
{
try
{

LoadInfo LI = new LoadInfo();
if (InvokeRequired)
{
delMX d = new delMX(SendMX); //delegate
this.BeginInvoke(d, new object[] { msg, dnsclient });
// MessageBox.Show(msg.ToString());
}
else
{
if (General.deliveryLog)
{
LI.WriteToLog(“Sending to : " + msg.To[0].Address);
}
IAsyncResult irs = dnsclient.BeginSend(msg, null, null);
// MessageBox.Show(msg.To.ToString());
Application.DoEvents();
// dnsclient.EndSend(irs);

// Thread.Sleep(1000);
//if (!irs.IsCompleted)
//{
// failedMessages.Add(msg);
//}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private delegate void delMX(MailMessage mm, DnsMailClient d1);

This is the code that i am using for sending bulk emails:

MailMessage template = CreateMessageSend();

TemplateEngine engine = new TemplateEngine(template);

InitializeDt();
MailMessageCollection messages = engine.Instantiate(dt);
SendMX(messages, messages);

private MailMessage CreateMessageSend()
{
MailMessage msg = new MailMessage();

msg.From = new MailAddress("sajeesh@yahoo.com”);

msg.ReplyTo = new MailAddress("sajeesh@yahoo.com");

msg.To.Add(new MailAddress("#EmailAddress#", “#DisplayName#”, true));

msg.Subject = “Bulk sending”;

msg.HtmlBody = General.MsgHtmlBody;

msg.Date = DateTime.Now;

return msg;

}

private void InitializeDt()
{
try
{
string frmName = " ";
dt = new DataTable();
this.dt.Columns.Add(“EmailAddress”, typeof(string));
this.dt.Columns.Add(“DisplayName”, typeof(string));
this.dt.Columns.Add(“FirstName”, typeof(string));
this.dt.Columns.Add(“LastName”, typeof(string));
this.dt.Columns.Add(“Company”, typeof(string));
this.dt.Columns.Add(“FromName”, typeof(string));
this.dt.Columns.Add(“FromEmailAddress”, typeof(string));
this.dt.Columns.Add(“Date”, typeof(string));
this.dt.Columns.Add(“Time”, typeof(string));
if (General.FromName != null)
{
frmName = General.FromName;
}
if (General.FromCompany == null)
{
General.FromCompany = " ";
}

this.dt.Rows.Add(new object[] {General.FromEI, frmName,frmName,frmName,General.FromCompany,
General.FromEI,DateTime.Now.Date.ToShortDateString(),DateTime.Now.ToShortTimeString()});
foreach (EmailList EL in General.MailList) // for bulk email id’s
{
if (EL.Subscribe)
this.dt.Rows.Add(new object[] { EL.EmailId,EL.DisplayName,
EL.FirstName,EL.LastName,EL.Company,frmName,EL.EmailId,
DateTime.Now.Date.ToShortDateString(),DateTime.Now.ToShortTimeString()});
}

private void SendMX(MailMessageCollection messages, MailMessageCollection RemMessages)
{
failedMessages = new MailMessageCollection();

try
{
dnsclient = new DnsMailClient();

for (int i = intVal; i < messages.Count; i++)
{
if (!MXSender.Paused)
{
intVal = i;
SendMX(messages[i], dnsclient);

}
}

if (failedMessages.Count > 1)
{
MessageBox.Show(“No of messages failed :” + failedMessages.Count.ToString());
}
}
catch
{
MessageBox.Show(“error”);
}
}
private void SendMX(MailMessage msg, DnsMailClient dnsclient)
{
try
{

LoadInfo LI = new LoadInfo();
if (InvokeRequired)
{
delMX d = new delMX(SendMX);
this.BeginInvoke(d, new object[] { msg, dnsclient });

}
else
{
if (General.deliveryLog)
{
LI.WriteToLog("Sending to : " + msg.To[0].Address);
}
IAsyncResult irs = dnsclient.BeginSend(msg, null, null);

Application.DoEvents();
// dnsclient.EndSend(irs);

// Thread.Sleep(1000);
//if (!irs.IsCompleted)
//{
// failedMessages.Add(msg);
//}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

Hi,
Is there any update on my previous questions? Its been one week that we are waiting for your reply…!!! We are in hurry, we need to develop our product very quickly. Please reply.


Regards,
Sajeesh

What exceptions you got for v4.1.2 dll? What's the difference behavior between v3 and v4 when you using? We are still working on this issue. These information is great helpful.

By the way, the DnsMailClient is based on the MX records of each email box. It is not as stable as SmtpClient. If you want to get the stable, I suggest you use SmtpClient.

Anyway, We will place a prority on this case. I will keep you posted.

Do you get SmtpFailedRecipientException or SmtpFailedRecipientsException? If yes, you can check the raw response from the remote server by:

SmtpFailedRecipientException.Reponse

or SmtpFailedRecipientsException.InnerExceptions[i].Respose