Sometimes sending mails using an SMTP server is not feasible for a projectís requirement. We may want to utilize the MX record of the recipientís domain name. The following technical tip shows how to send mails using mail servers of recipientís domain. We will be using Aspose.Network for doing this.


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


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

More about Aspose.Network

- Homepage of Aspose.Network:
- Read more technical tips by Aspose.Network.

Contact Information
Suite 119, 272 Victoria Avenue
Chatswood, NSW, 2067
Aspose - The .NET and Java component publisher
Phone: 888.277.6734
Fax: 866.810.94651