ASP.NET,C#.NET,VB.NET,JQuery,JavaScript,Gridview,SQL Server,Ajax,jQuery Plugins,jQuery UI,SSRS,XML,HTML,jQuery demos,code snippet examples.

Breaking News

  1. Home
  2. Bulk email
  3. What is Bulk Email Service?

What is Bulk Email Service?

What is Bulk Email Means
A bulk email service allows you to send email communications to large lists of multiple recipients by incorporating email into your applications. You can send one email to many people, or a unique email to each person on your list with a bulk email service.
Why use Bulk Email Service
Commonly, bulk email is used for newsletters or marketing email. If you have a list of customers or prospects, you can send them to content relevant to their business or interest, from a single application. A bulk email service allows you to send to any list, regardless of its size. The frequency at which you send is entirely up to you and should be based on what the recipients expect. Your engagement data, including spam reports, unsubscribes, and open and click rates, will tell you whether your message is hitting the mark.
Bulk Email Service provider
Find the list of Best Bulk Email Marketing Service Providers:
Sender.net is, objectively speaking, the best way to go – it offers email marketing automation, GDPR compliance is affordable and easy to use.
EasySendy Pro: Deliver Unlimited Emails via Cloud SMTP Relay Servers
Arctic: Marketing Automation Software for Business
SwipeMail
Sender.net – The best choice for E-Commerce
EmailOctopus – Email marketing for next to nothing, via Amazon SES
How to Send Bulk Email from Gmail using C# ASP.Net
Find the below source code to learn how to send bulk email using c#:-
bulk email service in asp.net c#
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Bulk Email Service C#</title>
    <link href="css.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
        <h2>Bulk Email Service in ASP.NET C#</h2>
        <div>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="listing-table">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Id" HeaderText="Id" ItemStyle-Width="30">
                        <ItemStyle Width="30px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="Name" HeaderText="Name" ItemStyle-Width="150">
                        <ItemStyle Width="150px"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Email">
                        <ItemTemplate>
                            <asp:HyperLink ID="lnkEmail" runat="server" Text='<%# Eval("Email") %>'
NavigateUrl='<%# Eval("Email", "mailto:{0}") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <br />
            <asp:Button ID="btnSendBulkEmail" runat="server" Text="Send Bulk Email" OnClick="btnSendBulkEmail_Click" />
        </div>
    </form>
</body>
</html>

using System;
using System.Data;
using System.Net;
using System.Net.Mail;
using System.Threading.Tasks;
using System.Web.UI.WebControls;

public partial class bulk_email_service_aspnet : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            DataTable dt = new DataTable();
            dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
                        new DataColumn("Name", typeof(string)),
                        new DataColumn("Email",typeof(string)) });
            dt.Rows.Add(1, "Ravi Kumar Singh", "rks@email.com");
            dt.Rows.Add(2, "SK Singh", "sks@email.com");
            dt.Rows.Add(3, "Nitin Kumar", "nk@email.com");
            dt.Rows.Add(4, "Kunal Verma", "kv@email.com");
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }
    }

    protected void btnSendBulkEmail_Click(object sender, EventArgs e)
    {
        //Create a temporary DataTable
        DataTable dtCustomers = new DataTable();
        dtCustomers.Columns.AddRange(new DataColumn[2] { new DataColumn("Name", typeof(string)),
                        new DataColumn("Email",typeof(string)) });

        //Copy the Checked Rows to DataTable
        foreach (GridViewRow row in GridView1.Rows)
        {
            if ((row.FindControl("chkSelect") as CheckBox).Checked)
            {
                dtCustomers.Rows.Add(row.Cells[2].Text, (row.FindControl("lnkEmail") as HyperLink).Text);
            }
        }

        string subject = "Welcome Email";
        string body = "Hello {0},<br />Hey there! :)";

      
        Parallel.ForEach(dtCustomers.AsEnumerable(), row =>
        {
            SendEmail(row["Email"].ToString(), subject, string.Format(body, row["Name"]));
        });
    }
    private bool SendEmail(string recipient, string subject, string body)
    {
        MailMessage mm = new MailMessage("sender@gmail.com", recipient);
        mm.Subject = subject;
        mm.Body = body;
        mm.IsBodyHtml = true;
        SmtpClient smtp = new SmtpClient();
        smtp.Host = "smtp.gmail.com";
        smtp.EnableSsl = true;
        NetworkCredential NetworkCred = new NetworkCredential();
        NetworkCred.UserName = "sender@gmail.com";
        NetworkCred.Password = "<password>";
        smtp.UseDefaultCredentials = true;
        smtp.Credentials = NetworkCred;
        smtp.Port = 587;
        smtp.Send(mm);
        return true;
    }
}
Did you find this post useful? I hope you liked this article. Please share with me your valuable suggestions and feedback.

No comments