[Solved] How can I send the same email message to more than 3000 customers [closed]


List<Customer> customerList = GetAllCustomers();

string subject = "Hello World";
string content = GetContent();

// Loop through all customers and send e-mail to each
foreach(Customer customer in customerList)
{
   MailMessage newMail = new MailMessage("[email protected]", customer.Email, subject, content);

   newMail.IsBodyHtml = true;

   SmtpClient sender = new SmtpClient();

   sender.Send(newMail);
}

You can move the GetContent() within the loop if you have a customer personalised email.

I hope you have their permission to send them e-mails. I share this code with you on the premise that it will not be used to spam people.

solved How can I send the same email message to more than 3000 customers [closed]