Click here to Skip to main content
15,881,938 members
Articles / Web Development / ASP.NET

Send 1000s of Emails Without Timeout

Rate me:
Please Sign up or sign in to vote.
4.53/5 (18 votes)
13 Dec 2009CPOL2 min read 61.1K   2.8K   83  
Now you can send more than 1000 emails with a simple website and a process
<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeFile="Default.aspx.cs"
    Inherits="_Default" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Newsletters</title>
</head>
<body>
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td>
                <h2>
                    Send 1000s of emails without timeout</h2>
            </td>
        </tr>
        <tr>
            <td>
                You have to options to send 1000s of newsletters, either via SQL server,
                or using the normal SMTP server, now the webpage will not be timeouted or blocked, the process will run smoothly and send as much newsletters are you want
            </td>
        </tr>
    </table>
    <br />
    <div id="tblBody" runat="server">
        <table border="0" cellpadding="4" cellspacing="2">
            <tr>
                <td style="color: white; font-weight: bold; width: 103px;" bgcolor="#aac7fd">
                    From
                </td>
                <td>
                    <asp:TextBox ID="txtFrom" runat="server" Width="300px" Text="admin@domain.com"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="color: white; font-weight: bold; width: 103px;" bgcolor="#aac7fd">
                    SMTP Server
                </td>
                <td>
                    <asp:TextBox ID="txtSMTP" runat="server" Width="300px" Text="localhost"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td style="color: white; font-weight: bold; width: 103px;" bgcolor="#aac7fd">
                    Send Via SQL
                </td>
                <td>
                    <asp:CheckBox ID="chkViaSql" runat="server" Text="" />
                </td>
            </tr>
            <tr>
                <td style="color: white; font-weight: bold; width: 103px;" bgcolor="#aac7fd">
                    Subject
                </td>
                <td style="width: 254px">
                    <asp:TextBox ID="txtSubject" runat="server" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top" style="color: white; font-weight: bold; width: 103px;" bgcolor="#aac7fd">
                    Body
                </td>
                <td style="width: 254px">
                    <asp:TextBox ID="txtBody" runat="server" TextMode="MultiLine" Width="300px" Rows="5"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <asp:Button ID="btnSend" runat="server" Text="Send Letter" OnClick="btnSend_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div id="tblStart" runat="server">
        the process started successfully, it might take from 1 minute up to 10 minutes
    </div>
    <div id="tblDetails" runat="server">
        Emails are sent successfully
    </div>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader IDS
Lebanon Lebanon
Adore programming, interested in workflows, SharePoint and silverlight, Entity Framework.
My Blog: http://suhamneimne.wordpress.com

Comments and Discussions