tags:

views:

347

answers:

3

how can send bulk emails to members via ASP.NET. for example send email for 100,000 members. in typical sending, asp.net throw exception.

please help me.

A: 

Simply add emails (which you may retreive from a database i guess) to the Bcc part of your MailMessage seperating them with a comma, which looks something like this:

        System.Net.Mail.MailMessage mm = new System.Net.Mail.MailMessage();
        mm.Bcc.Add("[email protected], [email protected], [email protected]");
        mm.Subject = "Subject";
        mm.Body = "Body";

        System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient();
        client.Send(mm);
bahith
BCC is good solution but only work for 400-500 emails, not 10,000 emails. give me better solution. such as GroupMail software but in the web
mmtemporary
+1  A: 

The bottom line is, this is not something you want to do.

ASP.NET was not designed to house a SMTP server inside of it's process.

If you realloy want to send out 100K emails, then you need to write your own console.exe app or a windows service to do this.

If you insist on doing this within ASP.NET your code needs to be super tight, and catch numerous exceptions, along with being able to handle multiple starts/stops/restarts without duplicating sent emails.

Cheers! Dave

dave wanta