<%@ Page language="c#" src="IssueReporter.aspx.cs" AutoEventWireup="false" Inherits="IssueReporter.IssueReporter" %>
<%--
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Mail;
namespace IssueReporter
{
///
/// Summary description for IssueReporter.
///
public class IssueReporter : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.TextBox txtComment;
protected System.Web.UI.WebControls.TextBox txtSender;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.CheckBox chkPriority;
protected System.Web.UI.WebControls.TextBox txtName;
protected System.Web.UI.WebControls.Button cmdSend;
protected System.Web.UI.WebControls.Label lblResult;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.cmdSend.Click += new System.EventHandler(this.cmdSend_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void cmdSend_Click(object sender, System.EventArgs e)
{
MailMessage msg = new MailMessage();
msg.Subject = "Issue Report";
msg.Body = "Submitted By: " + txtName.Text + "\n";
msg.Body += txtComment.Text;
msg.From = txtSender.Text;
msg.To = "yourname@youremailserver.com";
if (chkPriority.Checked) msg.Priority = MailPriority.High;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(msg);
lblResult.Text="Message sent to SMTP service.";
}
}
}
--%>