DNS Mail

Hi,

I evaluated Aspose.Network and I am interested in using this in my current application

And I think it is suited for my project. Also the sample Demo you have given
(

) is also working fine, using that I can implement the Pause and abort functionalities

Now before finalizing can you give me Timelimit to implement the DNS Mail feature …

Please give me a reply ( Positive or negative :slight_smile: )

Thanks
irshu

It will be ready next week. Moreover, I will try provide you a beta for your evaluation on Monday.

Best regards,

Hi,

That is great…

Thanks


Hello, Please try the attach dll for dns mail.

Sample code:

MailMessage msg = new MailMessage();
msg.From = "sender@mail.com";
msg.To = "use1@mail.com;user2@mail.com";
msg.Subject = "dns sending";
msg.Body = "it is a test.";
DnsMailClient client = new DnsMailClient();
client.Send(msg);

We are now working on the bulksending features which can leverage smtp and dns email sending. I will keep you posted.

Hi,

there is no dll attached…:slight_smile:

Please check it out.

Thanks

Hi,

It

Thanks … It works for me

But some times I am getting an Exception “Atleast one Recipient Failed”.

Is it possible to get which one is failed?

Also I am using the following code to send Bulkmail containing Email Tags (Using DNS)

MailMessage template = CreateMessage();
TemplateEngine engine = new TemplateEngine(template);

dt = new DataTable();
this.dt.Columns.Add(“EmailAddress”, typeof(string));
this.dt.Columns.Add(“DisplayName”, typeof(string));

this.dt.Rows.Add(new object[] { “TO@gmail.com”, “Gmail” });
this.dt.Rows.Add(new object[] { “TO@yahoo.com”, “Yahoo” });
this.dt.Rows.Add(new object[] { “TO@hotmail.com”, “HM” });

DnsMailClient client = new DnsMailClient();
foreach (MailMessage msg in messages)
{

client.Send(msg);

}

but it is little bit slow, and is there is any way to increase the speed???:slight_smile:


thanks
Irshu

Hi Irshu.

Please catch SmtpFailedRecipientsException exception for getting the failed recipients. The sample code for it may look like the following:

try

{

// prepare the msg file ......

DnsMailClient client = new DnsMailClient();

client.Send(msg);

}

// catch exception

catch (SmtpFailedRecipientsException ex)

{

// iterate through the individual failed recipients exceptions

foreach (SmtpFailedRecipientException frEx in ex.InnerExceptions)

{

// get the address of the failed recipient

MessageBox.Show(frEx.FailedRecipient);

}

}

For speed issue, can you tell us approx how much time it takes to send 1 message. How long it takes as compared to SMTP method.

The DNS method takes time becomes we have to lookup for MX records from DNS and then send the mails using these.

Hi saqib,

Thanx for the reply,

I ll test that…

Also

1) How to know that the Bulkmail Sending is completed??

‘smtpClient.BulkSendCompleted’ event is not working for me…

2) Is there is any option to control the speed of Mail Delivery
for eg: Setting time between each messages etc

3) In ‘SmtpClientBulkSendAgent(Client smtpClient,int Concurrent)’ Method,
what is Cocncurrent. Is it no of mails sending concurently .? If yes, Maximum how many messages we can send Concurrently ?

thanks
Irshu

Hi,



We are now working on the bulksending features which can leverage smtp and dns email sending. I will keep you posted


Any new addition to this ??

thanks

Hello,

1)

If you want to wait until the BulkSend Agent finish its work, you can call WaitForIdle funtion. It will wait until the all of the message are sent.

SmtpClientBulkSentAgent.WaitForIdle

I have also added an event naming "LastMessageSending", which occurs when the last mail message in the MessagePool is being sending. It is close to the bulksend completed.

SmptClientBulkSentAgent.LastMessageSending

2)

I added the DeliveryInterval, which can use to set the time between sending each messages.

SmtpClientBulkSentAgent.DeliveryInterval

3)

The concurrrenct is the number that running in the BulkSendAgent thread pool. No maximum for it. But I suggest you not to set it too large.

Please check the latest hot fix in the attachment.

Quick Sample

[C#]

SmtpClientBulkSendAgent agent = new SmtpClientBulkSendAgent(client,5);
agent.AddMessages(messages);
agent.LastMessageSending += new EventHandler(OnBulkSendCompleted);//add handler
agent.DeliveryInternal = 5;
agent.Start();//start the sending
agent.WaitForIdle(); //wait for idle

For using DNS mail sending in Bulksend, we are still working on the solution and architect.

Thanks

hi, saqib


currently i use version 5.1, i can not finding DnsMailClient class , i want to use this class to sending mail directly(pass through SMTP server use MX record).

how can i do?


Hi Pyntia,


Thank you for contacting to Aspose support team.

You may please use the sample code here to send the mail using DNS. Please give it a try and let us know your feedback.