posts - 64, comments - 387, trackbacks - 4

Simple Email Test Form

A simple and contained email test form

 

<script runat="server" language="c#">

private void Send(object sender, EventArgs e)

{

System.Web.Mail.MailMessage mail = new System.Web.Mail.MailMessage();

mail.Subject="test";

mail.From="youraddress@domain.com";

mail.Body="test";

mail.To=txtTo.Text;

System.Web.Mail.SmtpMail.SmtpServer = txtServer.Text;

System.Web.Mail.SmtpMail.Send(mail);

}

</script>

<html>

<head>

</head>

<body>

<form id="Form1" runat="server">

Server :

<asp:TextBox runat="server" ID="txtServer" />

<br />

To :

<asp:TextBox runat="server" ID="txtTo" />

<br />

<asp:Button runat="server" Text="Send" ID="send" OnClick="Send" /></form>

</body>

</html>

Print | posted on Saturday, May 10, 2008 4:56 PM | Filed Under [ Web Programming ]

Feedback

Gravatar

# Marcia Hinojosa

Cocktail Dresses wedding dresess 2012 tea length wedding dresses ball gown wedding dress a-line wedding dresses tea length wedding dress wedding dress styles evening dress patterns short wedding dresses mother of the bride evening dresses
1/11/2012 4:10 AM | dress for Weddings
Gravatar

# Wallpaper

This is a great post ! it was very informative. I look forward in reading more of your work. Also, I made sure to bookmark your website so I can come back later. I enjoyed every moment of reading it.
Funny Photos ll Wallpaper 2012 ll Amazing Photos
1/12/2012 4:05 AM | Wallpaper

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 8 and 3 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET