using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

 

using Utilities;

 

namespace Misc

{

    public partial class EmailExample : System.Web.UI.Page

    {

        protected void Page_Load(object sender, EventArgs e)

        {

          

        }

 

        protected void btnSendMail_Click(object sender, EventArgs e)

        {

            Email objEmail = new Email();

            String strTO = txtEmailTO.Text;

            String strFROM = txtEmailFROM.Text;

            String strSubject = txtSubject.Text;

            String strMessage = txtMessage.Text;

 

            try

            {

                objEmail.SendMail(strTO, strFROM, strSubject, strMessage);

                lblDisplay.Text = "The email was sent.";

            }

            catch (Exception ex)

            {

                lblDisplay.Text = "The email wasn't sent because one of the required fields was missing.";

            }

           

        }

    }

}