Send Email Using a DNS Server

Send Email Using a DNS Server

An easy way to send mail from .NET is to use the DnsMailClient class. Here’s some sample code in both C# and VB:

// in C#MailMessage msg = new MailMessage();msg.From = "[email protected]";msg.To = "[email protected];[email protected]";msg.Subject = "dns sending";msg.Body = "it is a test.";DnsMailClient client = new DnsMailClient();client.Send(msg);' in VB.NETDim msg As MailMessage = New MailMessage()msg.From = "[email protected]"msg.To = "[email protected];[email protected]"msg.Subject = "dns sending"msg.Body = "it is a test.Dim client As DnsMailClient = New DnsMailClient()client.Send(msg)
See also  Is Machine Learning Automating Creativity in Graphic Design?

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist