Free Support Forum -

DNS Mail


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: )


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

Best regards,


That is great…


Hello, Please try the attach dll for dns mail.

Sample code:

MailMessage msg = new MailMessage();
msg.From = "";
msg.To = ";";
msg.Subject = "dns sending";
msg.Body = "it is a test.";
DnsMailClient client = new DnsMailClient();

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


there is no dll attached…:slight_smile:

Please check it out.




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[] { "", “Gmail” });
this.dt.Rows.Add(new object[] { "", “Yahoo” });
this.dt.Rows.Add(new object[] { "", “HM” });

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



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


Hi Irshu.

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



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

DnsMailClient client = new DnsMailClient();



// 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




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…


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 ?



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 ??




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.


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.



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



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


SmtpClientBulkSendAgent agent = new SmtpClientBulkSendAgent(client,5);
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.


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.