---
title: "How can you send an email message from an ASP.NET Web page?"  
description: "How can you send an email message from an ASP.NET Web page?"  
author: "Sumit Kesarwani"  
published: 2014-08-25  
updated: 2020-09-19  
canonical: https://www.mindstick.com/interview/2006/how-can-you-send-an-email-message-from-an-asp-dot-net-web-page  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# How can you send an email message from an ASP.NET Web page?

You can use the System.Net.Mail.MailMessage and the System.Net.Mail.SmtpMail classes to send an email in your Web pages. In order to send an email through your mail server, you need to create an object of the SmtpClient class and set the server name, port, and credentials.

## Answers

### Answer by Sumit Kesarwani

You can use the System.Net.Mail.MailMessage and the System.Net.Mail.SmtpMail classes to send an email in your Web pages. In order to send an email through your mail server, you need to create an object of the SmtpClient class and set the server name, port, and credentials.


---

Original Source: https://www.mindstick.com/interview/2006/how-can-you-send-an-email-message-from-an-asp-dot-net-web-page

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
