<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>UltimateMail Web Demonstration</title>
    <link rel="Stylesheet" href="Css/Styles.css" />
</head>
<body>
    <form id="myform" runat="server">
        <div class="templatecontent">
            <div class="header">
                <a href="http://www.componentpro.com">
                    <img src="Css/Logo.gif" /></a>
            </div>
            This example shows how to use UltimateMail to send mail in a Web Application.<br />
            <br />
            <b>How to use:</b> All required fields are in <strong>bold</strong>.<ul>
                <li><strong>From Email: </strong>The author of this message. </li>
                <li><strong>To Email: </strong>The recipient of the message. </li>
                <li><strong>Subject: </strong>The subject of the message. </li>
                <li><strong>Content: </strong>The content of the message. </li>
                <li>Click on the <strong>Save</strong> button to download the message generated by UltimateMail
                    component. </li>
            </ul>
            <div class="content">
                <table border="0" cellspacing="0" cellpadding="3">
                    <tr>
                        <td style="white-space: nowrap">
                            <b>From Email:</b></td>
                        <td width="100%">
                            <asp:TextBox ID="txtFrom" runat="server" CssClass="textbox" Width="200px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="white-space: nowrap">
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="rfvFrom" runat="server" CssClass="error-1" ErrorMessage="From email is required"
                                ControlToValidate="txtFrom" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="revFrom" runat="server" ControlToValidate="txtFrom"
                                CssClass="error-1" Display="Dynamic" ErrorMessage="From Email is invalid" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td>
                    </tr>
                    <tr>
                        <td style="white-space: nowrap">
                            <b>To Email:</b></td>
                        <td width="100%">
                            <asp:TextBox ID="txtTo" runat="server" CssClass="textbox" Width="200px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="white-space: nowrap">
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="rfvTo" runat="server" CssClass="error-1" ErrorMessage="To email is required"
                                ControlToValidate="txtTo" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtTo"
                                CssClass="error-1" Display="Dynamic" ErrorMessage="To Email is invalid" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></td>
                    </tr>
                    <tr>
                        <td style="white-space: nowrap">
                            Subject:</td>
                        <td width="100%">
                            <asp:TextBox ID="txtSubject" runat="server" CssClass="textbox" Width="300px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td style="white-space: nowrap">
                            Content:</td>
                        <td width="100%">
                            <asp:TextBox ID="txtContent" runat="server" CssClass="textbox" Width="300px" Height="200px"
                                TextMode="MultiLine"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="lblResult" runat="server" CssClass="bodytext"></asp:Label></td>
                    </tr>
                    <tr>
                        <td></td><td>
                            <asp:Button CssClass="button" ID="btnSave" runat="server" Text="Save" OnClick="btnSend_Click" /></td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</body>
</html>
